Ejemplo n.º 1
0
        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");
        }
Ejemplo n.º 2
0
        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");
        }
Ejemplo n.º 3
0
        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;
        }