示例#1
0
        static void New_WithoutOR_WithNewKeyWord()
        {
            // we same name method in child class and Base class

            // I bege to situation ,System skal call till child class funktion
            Console.WriteLine("Inheritence Experiment----NEW");


            ChildClass ccObj = new ChildClass();
            // call  to function of childClass
            ChildClass childObj = new ChildClass();
            BaseClass  baseObj  = new ChildClass();

            // call  to function of childClass

            childObj.newExp();
            baseObj.newExp();
        }