This documentation is archived and is not being maintained.

10.2.2 The new modifier

Visual Studio .NET 2003

A class-member-declaration is permitted to declare a member with the same name or signature as an inherited member. When this occurs, the derived class member is said to hide the base class member. Hiding an inherited member is not considered an error, but it does cause the compiler to issue a warning. To suppress the warning, the declaration of the derived class member can include a new modifier to indicate that the derived member is intended to hide the base member. This topic is discussed further in Section 3.7.1.2.

If a new modifier is included in a declaration that does not hide an inherited member, a warning to that effect is issued. This warning is suppressed by removing the new modifier.

Show: