Exclusive Clothing Sale On Flipkart

Get up to 50% off on our latest collection.

Shop Now

Part 5 - Method Hiding in C# | Oops Tutorials in C# | Oops Concept

 Use new keyword when hiding base class's method in child class.

Different ways to call base class method Using Base KeyWord Can call base class's method in child class using base keyword. (base.ParentClassMethod) 2. Cast it to Parent type: ((BaseClass) ChildClassObject). BaseClassMethod() 3. Using Reference Type BaseClass Obj = New ChildClass childclassobj Obj.baseClassMethodname() Note: ChildClasschildclassObj =New BaseClass Obj (Compilation Error) #OopsConcept #Oops #OopsTutorials



Share this

Related Posts

Previous
Next Post »

Exclusive Clothing Sale On Flipkart

Get up to 50% off on our latest collection.

Shop Now