C# Delegates, Events, and Lambdas
C# Delegates, Events, and Lambdas Example Code *************************************** ** DELEGATES *************************************** --- BASIC DELEGATES --- 1 // declare the delegate type public delegate string MyDelegate(int arg1, int arg2); 2 static string func1(int a, int b) { return (a + b).ToString(); } static string func2(int a, int b) { return (a * b).ToString(); } 3 MyDelegate f = func1; Console.WriteLine("The number i...