Udostępnij za pośrednictwem


'<typename>' has the same name as another type exposed in a 'My' group

'<typename>' has the same name as another type exposed in a 'My' group. Rename the form or its enclosing namespace.

A class or structure is declared with the same name as a class or structure in one of the My objects.

A name collision could not be avoided between two classes that can be accessed through a My object, such as My.Forms.

If there is a potential name collision between classes in a My object, the compiler changes the property name for the type from ClassName to RootNamespace_Namespace_ClassName. For example, consider two forms named Form1. If one of these forms is in the root namespace WindowsApplication1 and in the namespace Namespace1, you would access that form through My.Forms.WindowsApplication1_Namespace1_Form1.

This error can occur if two classes have the same name and are in nested namespaces with underscores in their names. When the compiler constructs the new property names for the classes, there is still a name collision.

Error ID: BC36015

To correct this error

  1. Rename the new form.

  2. Rename the namespaces.

    Avoid naming any class or structure with the same name as an existing one.

See Also

Concepts

Resolving a Reference When Multiple Variables Have the Same Name

Reference

Form

My.Forms Object

MyGroupCollectionAttribute