Пример #1
0
 public static void Test_Type_01()
 {
     Trace.WriteLine();
     Trace.WriteLine("Test_Type_01");
     Test_01 test_01 = new Test_01();
     Trace.WriteLine("Type test_01.GetType() : {0} {1}", test_01.GetType().Name, test_01.GetType().FullName);
     ITest_01 itest_01 = test_01;
     Trace.WriteLine("Type itest_01.GetType() : {0} {1}", itest_01.GetType().Name, itest_01.GetType().FullName);
     Test_Type_01(test_01);
     Trace.WriteLine("Type typeof(Test_01) : {0} {1}", typeof(Test_01).Name, typeof(Test_01).FullName);
     Trace.WriteLine("Type typeof(ITest_01) : {0} {1}", typeof(ITest_01).Name, typeof(ITest_01).FullName);
     Trace.WriteLine("Type test_01.GetType() == typeof(Test_01) : {0}", test_01.GetType() == typeof(Test_01));
     Trace.WriteLine("Type test_01.GetType() == typeof(ITest_01) : {0}", test_01.GetType() == typeof(ITest_01));
     Trace.WriteLine("Type itest_01.GetType() == typeof(Test_01) : {0}", itest_01.GetType() == typeof(Test_01));
     Trace.WriteLine("Type itest_01.GetType() == typeof(ITest_01) : {0}", itest_01.GetType() == typeof(ITest_01));
     Trace.WriteLine("Type typeof(Test_01) == typeof(ITest_01) : {0}", typeof(Test_01) == typeof(ITest_01));
 }
Пример #2
0
        public static void Test_Type_01()
        {
            Trace.WriteLine();
            Trace.WriteLine("Test_Type_01");
            Test_01 test_01 = new Test_01();

            Trace.WriteLine("Type test_01.GetType() : {0} {1}", test_01.GetType().Name, test_01.GetType().FullName);
            ITest_01 itest_01 = test_01;

            Trace.WriteLine("Type itest_01.GetType() : {0} {1}", itest_01.GetType().Name, itest_01.GetType().FullName);
            Test_Type_01(test_01);
            Trace.WriteLine("Type typeof(Test_01) : {0} {1}", typeof(Test_01).Name, typeof(Test_01).FullName);
            Trace.WriteLine("Type typeof(ITest_01) : {0} {1}", typeof(ITest_01).Name, typeof(ITest_01).FullName);
            Trace.WriteLine("Type test_01.GetType() == typeof(Test_01) : {0}", test_01.GetType() == typeof(Test_01));
            Trace.WriteLine("Type test_01.GetType() == typeof(ITest_01) : {0}", test_01.GetType() == typeof(ITest_01));
            Trace.WriteLine("Type itest_01.GetType() == typeof(Test_01) : {0}", itest_01.GetType() == typeof(Test_01));
            Trace.WriteLine("Type itest_01.GetType() == typeof(ITest_01) : {0}", itest_01.GetType() == typeof(ITest_01));
            Trace.WriteLine("Type typeof(Test_01) == typeof(ITest_01) : {0}", typeof(Test_01) == typeof(ITest_01));
        }