public override Object Deserialize(StreamReader reader) { Example example = new Example(); var ser = new DataContractSerializer(typeof(Example)); using (XmlReader xw = XmlReader.Create(reader)) { return ser.ReadObject(xw, true); } }
static void Main(string[] Args) { Example myExample = new Example(); StreamWriter writer = new StreamWriter("../../a.xml"); myExample.Serialize(writer); SerializationTable table = new SerializationTable(); table.m_list.Add(new Example()); table.m_list.Add(new Example()); table.m_list.Add(new Example()); table.m_list.Add(new Example()); table.m_list.Add(new Example()); table.m_list.Add(new Example()); table.Serialize(); }