[Mono-bugs] [Bug 660474] Serialization incompatibility: MS.NET not able to deserialize Mono's Dictionary<K, V>

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Apr 19 18:59:59 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=660474

https://bugzilla.novell.com/show_bug.cgi?id=660474#c10


Alexander Nassian <picaschaf at me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |picaschaf at me.com

--- Comment #10 from Alexander Nassian <picaschaf at me.com> 2011-04-19 22:59:58 UTC ---
I encountered this bug in a very similar application (.NET Remoting service
running on Mono, Client running on MS.NET). If the server runs with MS.NET and
the Client Mono everything is fine again. After some deep research I discovered
a very simple workaround solution that is even faster than a standard
Dictionary. Just create a IEqualityComparer for the string type, implement it
that way and assign it to the problem making Dictionary objekt in the ctor:

[Serializable]
class Comparer : IEqualityComparer<string>
{
    #region IEqualityComparer[System.String] implementation
    public bool Equals (string x, string y)
    {
        return x.Equals(y);
    }

    public int GetHashCode (string obj)
    {
        return obj.GetHashCode();
    }
    #endregion
}

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list