Ejemplo n.º 1
0
        public static void CallDelegateFromGrandChild()
        {
            GrandChild child = new GrandChild();

            Assert.AreEqual("Child.AbstractFinal", new TestMethod(child.AbstractFinal));
            Assert.AreEqual("GrandChild.AbstractOverrideFinal", new TestMethod(child.AbstractOverrideFinal));
            Assert.AreEqual("Child.VirtualFinal", new TestMethod(child.VirtualFinal));
            Assert.AreEqual("GrandChild.VirtualNilFinal", new TestMethod(child.VirtualNilFinal));
            Assert.AreEqual("GrandChild.VirtualOverrideFinal", new TestMethod(child.VirtualOverrideFinal));
        }
Ejemplo n.º 2
0
        public static void CallFromInsideGrandChild()
        {
            GrandChild child = new GrandChild();

            child.TestGrandChild();
        }
Ejemplo n.º 3
0
        public static void CallDelegateFromGrandChild()
        {
            GrandChild child = new GrandChild();

            Assert.AreEqual("Child.AbstractFinal", new TestMethod(child.AbstractFinal));
            Assert.AreEqual("GrandChild.AbstractOverrideFinal", new TestMethod(child.AbstractOverrideFinal));
            Assert.AreEqual("Child.VirtualFinal", new TestMethod(child.VirtualFinal));
            Assert.AreEqual("GrandChild.VirtualNilFinal", new TestMethod(child.VirtualNilFinal));
            Assert.AreEqual("GrandChild.VirtualOverrideFinal", new TestMethod(child.VirtualOverrideFinal));
        }
Ejemplo n.º 4
0
 public static void CallFromInsideGrandChild()
 {
     GrandChild child = new GrandChild();
     child.TestGrandChild();
 }