Hi
I need to do a case insensitive search on a Generic list. I'm trying to use
the BinarySearch method but I get a complier error "cannot convert from
'System.Collect ions.CaseInsens itiveComparer' to
'System.Collect ions.Generic.IC omparer<string> ' "
List<stringlist = new List<string>();
list.Add(str1);
list.Add(str2);
list.Add(str3);
int index = list.BinarySear ch(otherstr, new CaseInsensitive Comparer());
What's the correct procedure?
Thanks
Andrew
I need to do a case insensitive search on a Generic list. I'm trying to use
the BinarySearch method but I get a complier error "cannot convert from
'System.Collect ions.CaseInsens itiveComparer' to
'System.Collect ions.Generic.IC omparer<string> ' "
List<stringlist = new List<string>();
list.Add(str1);
list.Add(str2);
list.Add(str3);
int index = list.BinarySear ch(otherstr, new CaseInsensitive Comparer());
What's the correct procedure?
Thanks
Andrew
Comment