From MSDN documentation:
In C#, derived classes can contain methods with the same name as base class methods. If the method in the derived class is preceded with the new keyword, the method is defined as being independent of the method in the base class.
And why the two code pieces are the same is explained below:
Using the new keyword tells the compiler that your definition hides the definition that is contained in the base class. This is the default behavior.
The only difference is that by using new
keyword, you avoid the compiler warning.
More explanation can also be found on MSDN in Knowing When to Use Override and New Keywords (C# Programming Guide).