Chapter 11 C # Delegation and Events

This article is transferred from: http://m.biancheng.net/csharp/110/

Delegates and events in the C # language are a major feature. Delegates and events are the most common applications in applications such as Windows Forms applications, ASP.NET applications, and WPF applications.

By defining delegates and events, you can facilitate method reuse and increase the efficiency of writing programs.

Delegates in C # are similar to pointers to functions in C or C ++. A delegate is a reference type variable that holds a reference to a method. References can be changed at runtime.

An event is basically a user operation, such as key presses, clicks, mouse movements, etc., or some occurrences, such as system-generated notifications.

In this chapter:
1.  Introduction to C # Delegate
2.  C # naming method delegation
3.  C # Multicast Delegation
4.  C # anonymous delegation
5.  C # event: Event

Guess you like

Origin www.cnblogs.com/hanguoshun/p/12729420.html