public static void T2() { Person2 mike = new Person2() { FirstName = "Mike", LastName = "F**k", ChineaseName = "What f**k" }; Binaryserializer.SerializeToFile(mike, @".\", "person.txt"); PersonAnother p = Binaryserializer.DeserializeFromFile <PersonAnother>(@".\person.txt"); }
public static void T3() { Employee mike = new Employee() { Name = "What f**k", Salary = 5000 }; Binaryserializer.SerializeToFile(mike, @".\", "person.txt"); Employee p = Binaryserializer.DeserializeFromFile <Employee>(@".\person.txt"); }
public static void T() { Person mike = new Person() { Age = 21, FirstName = "Mike", LastName = "F**k", ChineaseName = "What f**k", Department = "FuckDeris" }; mike.NameChanged += new EventHandler(mike_FieldChanged); mike.AgeChanged += new EventHandler(mike_FieldChanged); mike.Age = 55; Binaryserializer.SerializeToFile(mike, @".\", "person.txt"); Person p = Binaryserializer.DeserializeFromFile <Person>(@".\person.txt"); p.FirstName = "Rose"; p.Age = 23; }