using System;
namespace Test
{
public delegate int Something(int a, int b);
class MyMath
public int Add(int a, int b)
return a + b;
}
public class MyMain
public static void Main()
MyMath m = new MyMath();
Something delegateObject = new Something(m.Add);
Console.WriteLine(delegateObject.Invoke(5, 5));
// Calls Invoke!
Console.WriteLine(delegateObject(5, 5));