示例
Program.cs namespace DelegateExample
{public delegate int AddDelegate(int a, int b);internal class Program{static void Main(string[] args){Sample sample new Sample();AddDelegate addDelegate new AddDelegate(sample.Add);//int result addDelegate.Invo…