c#怪异的Lambda 语法
作者:互联网
原文链接:https://my.oschina.net/u/2296689/blog/545761
其实完全可以看成一种方法
[param list] => expression
method(param list){
expression
}
看上去是很像
小例子
其实完全可以看成一种方法
[param list] => expression
method(param list){
expression
}
看上去是很像
List<string> lastNames = new List<string> { “Einstein”, “Gore”, “Mayo” };
var famousPeople = lastNames.FindAll(lastName => lastName != “Mayo”);
famousPeople.ForEach(lastName => Console.WriteLine(lastName)
小例子
转载于:https://my.oschina.net/u/2296689/blog/545761
标签:c#,lastName,Mayo,oschina,param,545761,lastNames,怪异,Lambda 来源: https://blog.csdn.net/chuoxieai9700/article/details/100904899