OOPS In C# – Inheritance Part 8
Scenario-
Abstract class without abstract members.
Function present in both base class and child class. This concept is called Method hiding.
public class MyClass
{
public void foo()
{
Console.WriteLine("Base version of foo");
}
}
public class MyChild : MyClass
{
public new void foo()
{
Console.WriteLine("Child version of foo");
}
}