Delegate type '<delegatename>' of event '<eventname>' is not CLS-compliant
An Event Statement uses a delegate to specify its signature, but the Delegate Statement is marked as <CLSCompliant(False)>
or is not marked.
When you apply the CLSCompliantAttribute attribute 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 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: BC40050
If you require CLS compliance and have control over the definition of the delegate, apply CLSCompliantAttribute to its declaration to mark it as
<CLSCompliant(True)>
.If you do not have control over the definition of the delegate or cannot mark it as compliant, remove the CLSCompliantAttribute from the
Event
statement or mark it as<CLSCompliant(False)>
.
.NET feedback
.NET is an open source project. Select a link to provide feedback: