Here is source code of the C# Program to Display Results using Delegates. The C# program is successfully compiled and executed with Microsoft Visual Studio. The program output is also shown below.
* C# Program to Display Results using Delegates
public class example
public delegate int DelegateHandler(int a, int b);
static void Main(string args)
Results Results = new Results();
DelegateHandler sum = new DelegateHandler(Results.sum);
int result = sum(50, 20);
Console.WriteLine("Result is: " + result);
public class Results
public int sum(int a, int b)
return a + b;
Here is the output of the C# Program:
Result is: 70
Sanfoundry Global Education & Learning Series – 1000 C# Programs.