How to loop through a list and filter items starting with 'OO' in C#?
Advertisements I need to loop the List and then extract the specified items which starts with ‘OO’ to New list Here is my code :- List<string> mylist = new List<string>() Mylist.add(“5876575”); Mylist.add(“OO12571”); Mylist.add(“12287324”); Mylist.add(“87665751”); Mylist.add(“97213233”); Mylist.add(“87612222”); Mylist.add(“OO76566”); List<string> matches = new List<string>() matches = myList.Where(x => x[0] == ‘OO’).ToList(); My above code is not working… Read More How to loop through a list and filter items starting with 'OO' in C#?