摘要:
委托:回调函数实际上是方法调用的指针,也称为函数指针(即委托)属性集 修饰符 delegate 函数返回类型 定义的代表标识符(函数形参列表);修饰符包括new、public、protected、internal和private。<1>定义这种类型的委托代表了哪种类型的方法delegate int MyDelegate();<2>然后创建该委托的一个或多个实例。MyDelegate d = new MyDelegate(p.InstanceMethod);委托使用示例:如下声明一个返回类型为int,无参数的函数的代表MyDelegate:delegate int MyD
阅读全文