char (*Body)(char a,char a);
delegate char vest (char a, char b);
C#虽然对deleagte关键字做了大量的操作但是本质是改不了的(本人是这么理解的),它就是个记录函数地址的工具C#为了更方便语言的使用于是产生了
public delegate void Action();此委托无返回值
public delegate TResult Func<out TResult>();
//此委托泛型参数Tresult为最后一位且决定返回值类型,其他泛型参数为函数参数类型 如 Func<int,char,string> returnString 那么此时string在泛型参数的最后一个位置
//那么它就决定了返回值的类型 而int,char则为函数参数类型<//关于lambda表达式的简单认识Action<string> temp = par => Console.WriteLine(par);
// lambda格式: 参数 => 代码块 //注意这里后面代码块不可以存在返回值 且操作的函数参数要与定义的函数匹配
Func<int, string> s = par => 10+ par + "";
//这里使用func便需要返回值
Func<List<int>, int, string> ss = (par1, par2) => { return par1.Count + par2 + ""; }; temp(s(10)+" "+ss(new List<int>(),11)); Console.ReadLine();