a generic delegate being initialized with a normal method
using System;
public delegate void DelegateClass<T>(T data);
public class Starter {
public static void Main() {
DelegateClass<string> del = MethodA;
del("data");
}
public static void MethodA(string data) {
Console.WriteLine("MethodA ({0})", data);
}
}
Related examples in the same category