Is there any way to call the parent version of an overridden method? (C# .NET)

Inside of ChildClass.methodTwo(), you can call base.methodTwo().

Outside of the class, calling ((ParentClass)a).methodTwo() will call ChildClass.methodTwo. That’s the whole reason why virtual methods exist.

Leave a Comment