AqlaSolutions / AqlaSerializer

Binary serializer with full .NET support!
http://www.aqla.net
Other
16 stars 3 forks source link

When a SortedDictionary is serialized, does Aqla keep the "Comparer" of it? #59

Open inethui opened 6 months ago

inethui commented 6 months ago

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.

AqlaSolutions commented 6 months ago

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.