0
Delete words from list in c#
Guys i have problem to removing item from generic list in c# I have generic list contains words from text file. The text file is paper that i downloaded from scholar.Google.Com I want to delete all "THE" words from this list there is 65 "THE" in this file how do you suggest to delete them from list??
3 Respostas
+ 21
u can make another list and copy all != the words there or while making list insert only != the words
+ 6
wordlist.Sort();
int start= wordlist.IndexOf("THE");
int end= wordlist.LastIndexOf("THE");
wordlist.RemoveRange(start, end);
0
Tnx i did this with lambda expersions like this
List. Removeall(d1=>d1. Equals("the") ) ;
I dont know its correct or not