KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have spend a couple of hours trying to figure out why my generic Dictionary(Of String, String) is not ignoring case. Here is my code: Dim test As New System.Collections.Generic.Dictionary(Of String, String)(System.StringComparison.OrdinalIgnoreCase) test.Add("FROG", "1") Console.WriteLine(test.ContainsKey("frog")) The console shows "False" every time. It should be showing "True". If I use: Console.WriteLine(test."frog")) I get a KeyNotFoundException. It seems as if the Comparer parameter is being completely ignored. What is going on?
Tags (comma-separated)
Save Edits
Cancel