예제 #1
0
파일: delegate.cs 프로젝트: yukozh/coreclr
        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));
        }
예제 #2
0
        public static void CallFromInsideGrandChild()
        {
            GrandChild child = new GrandChild();

            child.TestGrandChild();
        }
예제 #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));
        }
예제 #4
0
파일: classic.cs 프로젝트: CheneyWu/coreclr
 public static void CallFromInsideGrandChild()
 {
     GrandChild child = new GrandChild();
     child.TestGrandChild();
 }