static void Main(string[] args) { TestObject TO = new TestObject(); StreamWriter Writer = new StreamWriter("./Out.txt", false); ClassWriter.WriteObject(TO, Writer); Writer.Flush(); Writer.Close(); StreamReader Reader = new StreamReader("./Out.txt"); var V = ClassReader.ReadObject(typeof(TestObject), Reader); }