They probably wanted you to say, "Use the keyword newto hide the method." Which technically does not cancel the method. if you have
class Base
{
public void Bar() { Console.WriteLine("Base"); }
}
class Derived : Base
{
public new void Bar() { Console.WriteLine("Derived"); }
}
And then you wrote
Derived derived = new Derived();
derived.Bar();
((Base)derived).Bar();
You will see different results. Thus, functions that use the base class will receive results for the base method, and functions that use the derived class will receive results for the new method.
source
share