4 Answers
4

The only effect the new keyword has is to remove the warning. The purpose of getting the warning when not using the new keyword is to prevent you from accidentally shadowing the method when you really meant to override it.

new is used to hide a method or property of the base class. This is not like overriding it : the member doesn't need to have the same signature as the hidden base class member, and is not involved in polymorphism.

new does nothing (except suppressing a warning). The hiding happens by leaving out override.
–
Henk HoltermanAug 10 '09 at 13:54

Yes, but by specifying the new keyword, you explicitly hide the member. Although it doesn't change anything in the end, it proves that you know what you're doing, and didn't accidentally forgot the override keyword
–
Thomas LevesqueAug 10 '09 at 14:16

Whether a derived-class method should be regarded as an override for a base-class method of the same name often depends upon whether the author of the derived-class method was aware of the base-class method and its associated contract and wrote the derived-class method to fulfill that contract. In most cases where a derived-class method has the same name and signature as a base-class method, the derived-class method would be intended to fulfill the base-class contract, but if the author of a deployed base class adds a name without realizing that the same name is used for some other purpose in a derived class, the derived-class method author cannot be presumed to have written his method to conform to the contract for a base-class method that didn't exist at the time.

There is no general means by which the C# can tell when different methods were added to classes, and thus no way for the compiler to know whether the author of a derived-class method knew anything about the existence of a like-named base class method unless the author of the derived-class method expressly indicates to the compiler whether or not he aware of the base-class method's existence by using the new or override modifiers.

I would suggest interpreting the modifiers (or lack thereof) as:

None -- The author is unaware of the existence of a base class method, and thus cannot be expecting to fulfill its contract.

new -- The author is aware of the base-class method, and for whatever reason has written this method so as not to fulfill it.

override -- The author is aware of the base-class method and its contract, and wrote this method to fulfill it.

The reason the compiler defaults to assuming new but with a warning is that in cases where the method is added to the derived class before the base-class method ever existed, the author cannot possibly be expected to have been aware of the base-class contract and cannot plausibly have been intending to fulfill a contract that didn't yet exist, but in cases where the derived-class method is written after the base-class method, the author should generally pick another name unless the author either intends to fulfill the base-class contract or has a specific reason for using the same name without fulfilling the contract. The compiler can't tell which method was written first, and thus has no way of knowing which behavior is appropriate.