예제 #1
0
        public void ChildClassExplicitParentClassOverridden()
        {
            NewAndOverrideClasses.ParentClass childClass = new NewAndOverrideClasses.ChildClassOverride();

            System.Diagnostics.Debug.WriteLine(System.Reflection.MethodBase.GetCurrentMethod().Name);
            System.Diagnostics.Debug.WriteLine(childClass.SayHelloWorld());
        }
        public void ChildClassSayingHelloWorld()
        {
            var childClass = new NewAndOverrideClasses.ChildClassOverride();

            System.Diagnostics.Debug.WriteLine(System.Reflection.MethodBase.GetCurrentMethod().Name);
            System.Diagnostics.Debug.WriteLine(childClass.SayHelloWorld());
        }
예제 #3
0
        public void ChildClassCallingHelperMethod()
        {
            var childClass = new NewAndOverrideClasses.ChildClassOverride();

            System.Diagnostics.Debug.WriteLine(System.Reflection.MethodBase.GetCurrentMethod().Name);
            System.Diagnostics.Debug.WriteLine(childClass.CallMethodToSayHelloWorld());
        }
        public void ChildClassExplicitInterfaceOverridden()
        {
            NewAndOverrideClasses.IHelloWorld childClass = new NewAndOverrideClasses.ChildClassOverride();

            System.Diagnostics.Debug.WriteLine(System.Reflection.MethodBase.GetCurrentMethod().Name);
            System.Diagnostics.Debug.WriteLine(childClass.SayHelloWorld());
        }