Beispiel #1
0
 protected override void TestMethod()
 {
     Property = 10;
     base.TestMethod();
     if (child != null)
     {
         child.TestMethod();
     }
     Console.WriteLine("Child1.TestMethod()");
     Console.WriteLine("Property = " + Property + " " + base.Property);
 }
Beispiel #2
0
            public static void Test()
            {
                var o = new Child1();

                o.child = new Child1();
                o.TestMethod();

                Console.WriteLine(((Base1)o).Property);
                Console.WriteLine(o.Property);
                Console.WriteLine(((Base1)o).VirtProp);
                Console.WriteLine(o.VirtProp);
            }