H
hdjim
I have a generic list of strings List<string> which I use the Contains
method to search but Contains does not provide a second parameter to
ignore case. What is the best way to do a search on a list ignoring
the case?
Example
List<string> lClasses = GetAllClasses();
String myClass = “myClass”;
if (lClasses.Contains(myClass))
do something
If myClass is not the correct case it’s not found. Should I use an
Array? Force everything to Upper?
TIA
hd
method to search but Contains does not provide a second parameter to
ignore case. What is the best way to do a search on a list ignoring
the case?
Example
List<string> lClasses = GetAllClasses();
String myClass = “myClass”;
if (lClasses.Contains(myClass))
do something
If myClass is not the correct case it’s not found. Should I use an
Array? Force everything to Upper?
TIA
hd