示例#1
0
        public void SetUp()
        {
            Man man = new Man();

            man.Age        = 135;
            man.FirstName  = "Вася";
            man.SecondName = "Пупкин";
            man.BinarySerialization("Example.bin");
            man.JsonSerialization("Example.json");
        }
示例#2
0
        static void Main(string[] args)
        {
            Man man = new Man("Вася", "Пупкин", 65);

            man.BinarySerialization();
            Man manFromFile = Man.StaticBinaryDeserialization();

            Console.WriteLine(man.ManInfo());
            Console.WriteLine(manFromFile.ManInfo());

            Console.ReadLine();
        }