public delegate int MyDelegate(int no1, int no2);

public class MyClass
{
    public static int Method1(int no1, int no2) => no1 + no2;
    public static int Method2(int no1, int no2) => no1 - no2;
}
MyDelegate delInstance1 = MyClass.Method1;
MyDelegate delInstance2 = MyClass.Method2;

var result1 = delInstance1(5, 3);
var result2 = delInstance2.Invoke(2, 5);

Delegate Data Types

public delegate Boolean ComparisonHandler(Int32 first, Int32 val2);

public static Boolean GreaterThan(Int32 first, Int32 second) => first > second;
public static Boolean SmallerThan(Int32 first, Int32 second) => first < second;

public static Int32[] BubbleSort(Int32[] items, ComparisonHandler comparisonMethod)
{
	for (var i = items.Length - 1; i >= 0; i--)
		for (var j = 1; j <= i; j++)
		{
			if (comparisonMethod(items[j - 1], items[j]))
			{
				var temp = items[j - 1];
				items[j - 1] = items[j];
				items[j] = temp;
			}
		}		
	return items;
}

static void Main()
{
	var items = new[] { 5, 6, 2, 1, 4, 3 };
	foreach (int element in BubbleSort(items, GreaterThan))
		Console.WriteLine(element);
	
	foreach (int element in BubbleSort(items, SmallerThan))
		Console.WriteLine(element);
}

Delegate Internals

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a989400f-2aa0-4aeb-851d-26ecd9b4d49c/Untitled

Closure

Delegate Operators