Hello gentlemen,

Since you're working on the Dictionary class, maybe you could help me debugging this. I have seen recent posts and patch to make the Dictionary more binary compatible between Mono and .Net (ie serialized data being compatible for serialization on one platform and deserialization on the other).

I've done a couple of tests and what surprises me is that the binary form looks different in many cases but can still be deserialized by the other platform... in most cases only (see the example below).

=> What's the status for the Dictionary class. Are Mono and .Net officially binary compatible for the Dictionary or not yet?

Examples:
- Case 1: I have a Dictionary<long, DateTime>. Even if different, the binary serialized forms can be deserialized by the other platform (!). (see dico1_dotnet.bin and dico1_mono.bin). - Case 2: I have a Dictionary<long, Triplet<long, ManagementState, DateTime>> where Triplet is a simple triplet struct (see below) and ManagementState a basic enum. Here, neither Mono not .Net is able to deserialize a dico serialzed by the other (see dico2_dotnet.bin and dico2_mono.bin).

Thanks for your advice!
Lionel

Here's the Triplet struct:
[Serializable]
public struct Triplet<TX, TY, TZ>
{
   TX _X;
   TY _Y;
   TZ _Z;

   public Triplet(TX x, TY y, TZ z)
   {
       this._X = x;
       this._Y = y;
       this._Z = z;
   }

   public TX X
   {
       [DebuggerStepThrough]
       get { return _X; }
   }
   public TY Y
   {
       [DebuggerStepThrough]
       get { return _Y; }
   }
   public TZ Z
   {
       [DebuggerStepThrough]
       get { return _Z; }
   }
}

Attachment: dico1_mono.bin
Description: Binary data

Attachment: dico2_dotnet.bin
Description: Binary data

Attachment: dico2_mono.bin
Description: Binary data

Attachment: dico1_dotnet.bin
Description: Binary data

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to