You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when a SortedDictionary is serialized/deserialized, its keys are sorted by the natural order of the key's type. The "Comparer" assigned to the SortedDictionary is lost.
The text was updated successfully, but these errors were encountered:
You are right, the comparer is not stored. Unless the comparer is serializable too, it's even impossible to implement. If the deserialization creates a new instance of the sorted dictionary, it doesn't know which comparer to use.
I noticed that when a SortedDictionary is serialized/deserialized, its keys are sorted by the natural order of the key's type. The "Comparer" assigned to the SortedDictionary is lost.
The text was updated successfully, but these errors were encountered: