[9-5]委托的使用
1.委托的声明
delegate void DGMethod(string str)
2.创建委托,添加方法指针
DGMethod method = new DGMethod(getString)
也可以使用简单创建 DGMethod method = getString
3.调用委托
method(str)
Action<T> 无返回类型
Func<T> 可有返回值
Func<double,double>[] operations ={ ,}
1.委托的声明
delegate void DGMethod(string str)
2.创建委托,添加方法指针
DGMethod method = new DGMethod(getString)
也可以使用简单创建 DGMethod method = getString
3.调用委托
method(str)
Action<T> 无返回类型
Func<T> 可有返回值
Func<double,double>[] operations ={ ,}