(.NET) List.FindAll

C#/Winform 2017. 4. 15. 22:06
728x90
728x170

List<string> testList = new List<string>() { "aa", "bb", "cc", "dd" };

List<string> difList = testList.FindAll(delegate(string s) { return !s.Equals("aa"); }); 

결과

difList

  [0] "bb" string
  [1] "cc" string
  [2] "dd" string 

728x90
그리드형
Posted by kjun.kr
,