WCF DataContract: Dictionary<string, object> Types must use StringComparer.OrdinalIgnoreCase
-
I must use StringComparer.OrdinalIgnoreCase instead of the default GenericComparer<> to compare the keys in the dictionaries. It's no problem to create and work service side with such Dictionaries because I have full control over creation of it. But when the generated client proxy communicates with the service the creation happens behalf of the deserializer ( ? ) and it's using the default GenericComparer<> instead of the StringComparer.OrdinalIgnoreCase. On one hand it seems that there is no way to change the Comparer after the dictionary was created because it is a constructor argument and on the other hand it makes no sense at all because all wsdl based generated proxies must have knowledge about the special comparer type as well. Is there any way to define the Comparer Type for DataContract Collection? read the full story here http://forums.microsoft.com/forums/ShowPost.aspx?PostID=3263018&SiteID=1[^] Thanks