I am serializing a Dictionary to XML. When I create a new dictionary I use the constructor to provide EqualityComparer without casing for instance
var tabs = new Dictionary<string,Tab>(StringComparer.OrdinalIgnoreCase);
I then serialize to XML and when I deserialize information about casing is lost - the deserialization is made to the Dictionary with GenericEqualityComparer, which apparently is case sensitive, because it doesn't find my keys if they are not cased correctly.
Any ideas how can I change it?
One way would be to create a new dictionary and copy the data from the deserialized over to the new one but this seems troublesome.
UPDATE:
The deserialization worked the whole time it is just that it deserializes the serialized Dictionary to one that does not use case insensitive keys.