Edit

Share via


Member '<membername1>' conflicts with a member implicitly declared for member '<membername2>' in the base type '<basetypename>' and so should not be declared 'Overloads'

A property or procedure in a derived class uses the same name as an implicit member of the base class and specifies the Overloads keyword.

Overloading is used to define multiple versions of a property or procedure all in the same class. You cannot define an additional version of a base class member unless that base class member already specifies Overloads. Because implicit members do not specify Overloads, the compiler assumes that this property or procedure Shadows the implicit base class member.

The Visual Basic compiler creates implicit members corresponding to certain programming elements you declare. The following table summarizes these implicit, or synthetic, members.

Declared element Implicitly created members
Enumeration value__ member
Event add_<eventname> procedure

remove_<eventname> procedure

<eventname>Event field

<eventname>EventHandler delegate
Property get_<propertyname> procedure

set_<propertyname> procedure
My.Form member, My.WebService member, or member of a class marked with the MyGroupCollectionAttribute attribute m_<variablename> Static variable

<variablename> property

get_<variablename> procedure

set_<variablename> procedure
WithEvents variable _<variablename> variable

<variablename> property

get_<variablename> procedure

set_<variablename> procedure

Because of the risk of name conflicts, you should avoid naming any declared programming element using the same form as any one of these implicit members. For example, you should avoid any element name that starts with get_ or set_.

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

Error ID: BC40023

To correct this error

  • Change the name of the property or procedure to avoid conflicts with the names listed in the previous table.

See also