public class test
 2 {
 3 public deledate void MenuHandler(string username);
 4 public void MenuHandlershixian(string username)
 5 {
 6 response.write(username);
 7 }
 8 public void show()
 9 {
10 MenuHandler mh=MenuHandlershixian;
11 mh("majuan");
12 }
13 public static void main()
14 {
15 show();
16 }
17 
18 }
 
 
MenuHandler mh=new MenuHandler(this.MenuHandlershixian);
MenuHandler mh=this.MenuHandlershixian;
作用是一样的 都是获得此方法的委托实例

相关文章:

  • 2021-12-22
  • 2022-02-19
  • 2022-12-23
  • 2021-09-30
  • 2021-05-10
  • 2021-11-30
  • 2021-06-21
  • 2021-07-01
猜你喜欢
  • 2021-08-16
  • 2021-12-22
  • 2021-05-22
  • 2022-02-14
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案