The following code does not work successfully.using System;using System.IO;using System.Xml;using System.Runtime.Serialization.Formatters.Binary;namespace ConsoleApplication1{ class Class1 { [Serializable] public class SomeClass : IComparable { public IComparable Value; #region Miembros de IComparable public int CompareTo(object obj) { return 0; } #endregion } static void Main(string[] args) { // esto anda BinaryFormatter fmt = new BinaryFormatter(); MemoryStream ms = new MemoryStream(); SomeClass str = new SomeClass(); str.Value = "s"; // aca le paso un string fmt.Serialize(ms, str); ms.Seek(0, SeekOrigin.Begin); object a = fmt.Deserialize(ms); // esto no ms = new MemoryStream(); str = new SomeClass(); str.Value = 12; // aca un int fmt.Serialize(ms, str); ms.Seek(0, SeekOrigin.Begin); object a2 = fmt.Deserialize(ms); } }}The strangest issue is that changing the definition of "public IComparable Value;" to "public object Value;" make it work.