Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

Non-CLS-compliant <membername> is not allowed in a CLS-compliant interface 

A property, procedure, or event in an interface is marked as <CLSCompliant(True)> when the interface itself is marked as <CLSCompliant(False)> or is not marked.

For an interface to be compliant with the Common Language Specification (CLS), all its members must be compliant.

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: BC40033

To correct this error

  • If you require CLS compliance and have control over the interface source code, mark the interface as <CLSCompliant(True)> if all its members are compliant.

  • If you require CLS compliance and do not have control over the interface source code, or if it does not qualify to be compliant, define this member within a different interface.

  • If you require that this member remain within its current interface, remove the CLSCompliantAttribute from its definition or mark it as <CLSCompliant(False)>.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.