Here is the listing of C# programming examples on Delegates.
1. C# Examples illustrating the Basic Functions of Delegates
Delegate in C# is similar to pointer in C. It is a reference type variable which contains a reference to a method. The following programs combine 2 delegates, demonstrates an array of delegates and displays the corresponding results using delegates.
C# Program to Combine Two Delegates
C# Program to Illustrate Array of Delegates
C# Program to Display Results using Delegates
2. C# Examples illustrating the types of Delegates
A delegate can define its own type parameters. The generic delegate can specify the type argument to create a closed constructed type. The multicast delegate consists of a list of the assigned delegates. When the multicast delegate is called, it invokes the other delegates in the list in order. Only delegates of the same type can be combined. The following programs creates generic delegates, implements delegates and multicast delegates and declares and instantiates delegates.
C# Program to Create Generic Delegate
C# Program to Implement Multicast Delegates
C# Program to Implement Delegates
C# Program to Declare and Instantiate Delegates
3. C# Examples illustrating the use of Delegates in Mathematics
The programs in this section perform math operations using delegates, converts feet to inches using delegates. The other programs in the section implements principles of delegates, implements arithmetic operations like Addition, Subtraction, Multiplication and Division using delegates.