LINQ和委托随意转化例子参考
作者:互联网
static void Main(string[] args) { //LINQ简化 Action<string> f1 = s => Console.WriteLine(s); //委托 Action<string> f11 = delegate (string s) { Console.WriteLine(s); }; //LINQ简化 Func<int, bool> f2 = i => i > 5; //委托 Func<int, bool> f3 = delegate (int i) { return i > 5; }; f1("123"); f11("1234"); f2(4);
标签:随意,f1,f2,Console,Func,参考,LINQ,WriteLine 来源: https://www.cnblogs.com/NangFah/p/16627960.html