Hi,
Is it possible to create a case-insensitive List<stringcoll ection?
E.g.
List<stringMyLi st = new List<string>;
MyList.Add("MyS tring");
So that:
MyList.Contains ("mystring")
MyList.Contains ("MyString")
MyList.Contains ("MYSTRING")
all return true.
Google shows plenty of examples of how to do this with Dictionary<stri ng,
stringcollectio ns e.g.
Dictionary<stri ng, stringMyDiction ary = new Dictionary<stri ng,
string>(StringC omparer.Current CultureIgnoreCa se);
but I can't find an equivalent for List<string>...
Any assistance gratefully received.
Mark
Is it possible to create a case-insensitive List<stringcoll ection?
E.g.
List<stringMyLi st = new List<string>;
MyList.Add("MyS tring");
So that:
MyList.Contains ("mystring")
MyList.Contains ("MyString")
MyList.Contains ("MYSTRING")
all return true.
Google shows plenty of examples of how to do this with Dictionary<stri ng,
stringcollectio ns e.g.
Dictionary<stri ng, stringMyDiction ary = new Dictionary<stri ng,
string>(StringC omparer.Current CultureIgnoreCa se);
but I can't find an equivalent for List<string>...
Any assistance gratefully received.
Mark
Comment