CLSCompliantAttribute
suggest changeSyntax
- [assembly:CLSCompliant(true)]
- [CLSCompliant(true)]
Parameters
- CLSCompliantAttribute(Boolean) : Initializes an instance of the CLSCompliantAttribute class with a Boolean value indicating whether the indicated program element is CLS-compliant
Remarks
The Common Language Specification (CLS) is a set of base rules to which any language targeting the CLI (a language that conforms to the Common Language Infrastructure) should conform in order to interoperate with other CLS-compliant languages.
When you distribute a library, mark the assembly CLS-compliant if callers may use other languages. The attribute does not make the code compliant by itself. It tells the compiler to check the public API against the CLS rules and report a warning when a rule is broken. Compliant public APIs can be consumed by any language that runs on the Common Language Runtime.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents