...

/

Hiding vs. Overriding a Method

Hiding vs. Overriding a Method

Learn to create a new method with the same signature.

We'll cover the following...

Hide

Hiding creates a method of the same name and signature as it it’s defined in the base class. To hide a method, we use the new keyword:

public new void Voice()
{
}

Instead of providing a method with a different implementation (overriding), the new keyword creates an entirely different method, but with the same name and signature. A method marked with the new ...