Exemple #1
0
 static void Main(string[] args)
 {
     Checker check = new Checker(); 
     ClassA try1 = new ClassA();
     ClassB try2 = new ClassB();
     ClassC try3 = new ClassC();
     ClassD try4 = new ClassD();
     MyStruct try5 = new MyStruct();
     object try6 = try5;
     Console.WriteLine("Analyzing ClassA type variable:");
                       // Анализ переменной типа ClassA 
     check.Check(try1);
     Console.WriteLine("\nAnalyzing ClassB type variable:"); 
                       // Анализ переменной типа ClassB 
     check.Check(try2);
     Console.WriteLine("\nAnalyzing ClassC type variable:");
                       // Анализ переменной типа ClassC 
     check.Check(try3);
     Console.WriteLine("\nAnalyzing ClassD type variable:");
                       // Анализ переменной типа ClassD  
     check.Check(try4);
     Console.WriteLine("\nAnalyzing MyStruct type variable:");
                       // Анализ переменной типа MyStruct  
     check.Check(try5);
     Console.WriteLine("\nAnalyzing boxed MyStruct type variable:"); 
                       // Анализ упакованной 
     check.Check(try6); 
     Console.ReadKey(); 
 }