标签:
1 class Program 2 { 3 static void Main() 4 { 5 Class1 c1 = new Class1(); 6 c1.Start(); 7 } 8 } 9 10 class Class1 11 { 12 public static void Hello() 13 { 14 Console.WriteLine("Hello"); 15 } 16 17 public void Start() 18 { 19 Class2 c2 = new Class2(); 20 c2.Show(Hello); 21 } 22 } 23 24 delegate void de(); 25 26 class Class2 27 { 28 public void Show(de d) 29 { 30 d(); 31 } 32 }
标签:
原文地址:http://www.cnblogs.com/zhouzhuang/p/5132139.html