Find()   :检索与指定匹配的第一个元素

FindAll()   : 检索与指定匹配的所有元素

如:List<string> strList=new List<string>(){"1111111111","22222222211","33333333333","44444444"};

string resultStr=strList.Find(delegate(string str){return str.EndsWith("1")}) ;  

 返回"111111111111"

List<string> resultStrList=resultStrList.FindAll(delegate(string str){return str.EndsWith("1")});

返回"111111111111111","222222222222222221"

相关文章:

  • 2021-08-07
  • 2022-12-23
  • 2021-05-06
  • 2022-12-23
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
猜你喜欢
  • 2022-12-23
  • 2021-05-28
  • 2021-09-07
相关资源
相似解决方案