Can we hide the derived class public method so that it is not accessible in Main() function in C#. We can't change the accessors of the derived class method.
public class A
{
public void Add()
{
}
}
public class B : A
{
public void Multiply()
{
}
}
In main() method in C#
B b = new B();
b.mulitply(); // should give compile time error... Like method not founded.
Is there any way we can do it.