类似如下的语句,查找b这个字符串:
//定义一个List
List<string> ls = new List<string> { "a", "b", "c", "def" };
//查找list中为b的这一项
var item = ls.Find((x) => { return x == "b"; });
类似如下的语句,查找b这个字符串:
//定义一个List
List<string> ls = new List<string> { "a", "b", "c", "def" };
//查找list中为b的这一项
var item = ls.Find((x) => { return x == "b"; });