Udostępnij za pośrednictwem


'Microsoft.VisualBasic.ComClassAttribute' on class '<classname>' implicitly declares <type> '<membername>', which conflicts with a member of the same name in <type> '<typename>'

'Microsoft.VisualBasic.ComClassAttribute' on class '<classname>' implicitly declares <type> '<membername>', which conflicts with a member of the same name in <type> '<typename>'. Use 'Microsoft.VisualBasic.ComClassAttribute(InterfaceShadows:=True)' if you want to hide the name on the base '<typename>'.

A class using a COMClassAttribute attribute block implicitly defines an interface with the same name as a member of the base class. In this situation, the interface name should shadow the base class member.

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

Error ID: BC42101

To correct this error

  1. If you intend to hide the base class member, set InterfaceShadows:=True in the ComClassAttribute attribute block.

  2. If you do not intend to hide the base class member, change the name of the class.

See Also

Concepts

Attributes Used in Visual Basic

Application of Attributes

Reference

ComClassAttribute Class

ComClassAttribute.InterfaceShadows Property