Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Visual Basic
 Name <membername> is not CLS-compli...

  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
Name <membername> is not CLS-compliant

An assembly is marked as <CLSCompliant(True)> but exposes a member with a name that begins with an underscore (_).

A programming element can contain one or more underscores, but to be compliant with the Common Language Specification (CLS), it must not begin with an underscore. See Declared Element Names.

When you apply the CLSCompliantAttribute to a programming element, you set the attribute's isCompliant parameter to either True or False to indicate compliance or noncompliance. There is no default for this parameter, and you must supply a value.

If you do not apply the CLSCompliantAttribute to an element, it is considered to be noncompliant.

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

Error ID: BC40031

To correct this error

  • If you have control over the source code, change the member name so that it does not begin with an underscore.

  • If you require that the member name remain unchanged, remove the CLSCompliantAttribute from its definition or mark it as <CLSCompliant(False)>. You can still mark the assembly as <CLSCompliant(True)>.

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