[Mono-bugs] [Bug 558060] New: HashTable with StringComparer.CurrentCultureIgnoreCase is NOT Ignoring Case
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Nov 24 11:11:44 EST 2009
http://bugzilla.novell.com/show_bug.cgi?id=558060
http://bugzilla.novell.com/show_bug.cgi?id=558060#c0
Summary: HashTable with StringComparer.CurrentCultureIgnoreCase
is NOT Ignoring Case
Classification: Mono
Product: MonoTouch
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Runtime
AssignedTo: gnorton at novell.com
ReportedBy: jondick at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5)
Gecko/20091102 Firefox/3.5.5 (.NET CLR 4.0.20506)
The code below shows a quick example of Hashtable not obeying the comparer
passed into it.
System.Collections.Hashtable ht = new
System.Collections.Hashtable(StringComparer.CurrentCultureIgnoreCase);
ht.Add("string", "");
Console.WriteLine("Contains Key: {0}", ht.ContainsKey("String"));
However, this code below returns 0 as expected, so the comparer works fine,
just the hashtable is not using it:
Console.WriteLine("Ignore Case Compare: {0}",
StringComparer.CurrentCultureIgnoreCase.Compare("String", "string"));
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list