Esempio n. 1
0
 static void Main(string[] args)
 {
     FileInfoExamlpe.Execute();
     Console.WriteLine("Press key to continue");
     Console.ReadKey();
     AttributesExample.ExecuteHW9();
     Console.WriteLine("Press key to continue");
     Console.ReadKey();
     AttributesExample.ExecuteHW10();
     Console.WriteLine("Press key to continue");
     Console.ReadKey();
     SerializedExample.SerializedToJson();
     Console.WriteLine("Press key to continue");
     Console.ReadKey();
     SerializedExample.DeSerializedFromJson();
     Console.WriteLine("Press key to continue");
     Console.ReadKey();
     AssemblyExample.Execute();
     Console.ReadKey();
 }
Esempio n. 2
0
        static async void ShowSerialization()
        {
            Console.WriteLine($"===========Attributes example(HW10 SerializedToJson)============");

            Console.WriteLine("Create new object exampleClass");
            ExampleClass exampleClass = new ExampleClass {
                ClassName = "MyClass"
            };

            exampleClass.MyClassExec();
            exampleClass.UpdateExecDate(new DateTime(2021, 02, 01));
            exampleClass.MyClassExec();

            SerializedExample <ExampleClass> .SerializedToJson(exampleClass);

            Console.WriteLine("Press key to continue");
            Console.ReadKey();

            Console.WriteLine($"===========Attributes example(HW10 DeSerializedFromJson)============");
            ExampleClass exampleClassNew = await SerializedExample <ExampleClass> .DeSerializedFromJson();

            exampleClassNew.MyClassExec();
            Console.ReadKey();
        }