Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Visual Basic
 <type1> '<membername>' shadows an o...

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Basic Reference: Error Messages
<type1> '<membername>' shadows an overloadable member declared in the base <type2> '<classname>'

Error Message

<type1> '<membername>' shadows an overloadable member declared in the base <type2> '<classname>. If you want to overload the base method, this method must be declared 'Overloads'.

A derived class defines a Function or Sub procedure or a Property with the same name as a procedure or property defined in the base class. Because procedures and properties are overloadable members, the derived class can either overload or shadow the base class member. However, the derived class code does not specify either Overloads or Shadows in the declaration. In the absence of either keyword, the compiler assumes Shadows.

It is good programming practice to specify either Overloads or Shadows. This makes your code easier to read and understand.

By default, this message is a warning. For more information about hiding warnings or treating warnings as errors, see Configuring Warnings in Visual Basic.

Error ID: BC40003

To correct this error

  • If you want to overload the base class method or property, include the Overloads keyword in the declaration.

  • If you want to shadow the base class method or property, include the Shadows keyword instead of Overloads.

  • If you do not want to either overload or shadow the base class member, change the name of the derived class member.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker