. NET Framework code samples study-Advanced samples

Source: Internet
Author: User

Send & receive data via HTTP

Receive and send data through HTTP

Send and receive data using HTTP and streams using the system. Net classes

Main Class Library: webrequest webresponse filestream memorystream

 

Multithreading

Multithreading

Use multiple threads to achieve concurrency in tasks

Run the task on other threads, allowing the user to continue interacting with the main form.

Solution in two ways:

(1) runs the task from a thread in the worker pool

An asynchronous delegate is an easy way to run a task on a worker thread, and there are also other options for accessing the worker pool threads

(2) creates a new Win32 thread and runs the task on it

 

Remoting

Usually there are three parts/Projects

1. remotecustomer (A Class Library)

2. Host

3. Client

Using three types of remote objects

'Client-activated 'object

Well-known Singleton objects (one object for each clients)

Well-known single call objects (each client gets its own instance which lives for one method call only: A stateless object)

Main Class Library: remotingconfiguration

 

Serializing & deserializing objects

Serialize and deserialize an object to/from a stream.

Namespace: system. runtime. serialization

 

Interacting with a Windows Service

Control an installed Windows service from code

Namespace: system. serviceprocess

This example also demonstrates how to minimize winform to the taskbar and use counters.

 

Use the Win32 API

How to Use Win32 API functions

Dllimport attribute declare statement

This example also demonstrates the use of tab

 

Use Animation

How to Do animation with GDI +, including classic Frame Animation, drawing and moving a shape on the screen, and animating text with a gradient fill.

GDI + start page (msdn)

 

Create a screensaver with GDI +

How to Create a screen saver

 

Manipulating images with GDI +

How to manipulate images using GDI +.

This example also demonstrates openfiledialog and savefiledialog

 

Working with GDI +-brushes

Shows failed of the features available when using the brush object in GDI +.

 

Working with GDI +-Text

Shows some of the specified features available when using GDI + to work with text.

 

Working with resource files

How to work with resource files and the "localizable" property of the form to localize an application.

 

(Network Programming): Use sockets

How to Use sockets in C #

Three important aspects of Sockets communication:

1. Server-to-client communication.

2. Client-to-client communication.

3. Client-to-server request with server response.

 

Use thread pooling

How to Use thread pooling in C #.

Three uses of the thread pool in. Net:

1. Function queuing

2. Timers

3. synchronization objects

 

(Windows Services): creating a Windows Service

How a Windows service is created and deployed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.