c#3.0 Lambda 表达式

使用c# 2.0 中的匿名方法查找“内部包含abc子串的所有字符串”:

list.FindAll(

  delegate(string s)

  {

    renturn s.indexof("abc")>=0;
  }

)

使用c# 3.0 中的Lambda表达式查找“内部包含abc子串的所有字符串”: 

list.FindAll(s=>s.indexof("anc")>=0)

有时候不是我们失去了目标,而是失去了方向。
原文地址:https://www.cnblogs.com/871735097-/p/3828586.html