摘要:
一、概念 委托的本质也是一种类型,类似于Class这样。作用是将一个方法作为参数传递给另一个方法,关键字是delegate 二、委托的定义使用步骤 第一步声明委托: public delegate int myDelegate(int a, int b); 1、声明一个委托类型,可以用访问修饰符修饰 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace 回调函数Demo { /* 回调函数的作用,1.分装;2.异步;3.扩展具体方法。 * 通过一个委托给出实现 阅读全文