Name
CLSCompliant Attribute
Class
System.CLSCompliantAttribute
Applies to
All
Description
Indicates whether the program element compiles with the Common
Language Specification. If the CLSCompliant
attribute is not present, the VB.NET compiler does not enforce CLS
compliance. This can prevent other languages from successfully
accessing components written in VB.NET.
If a particular program element is marked as CLS-compliant, it is assumed that all contained program elements are CLS-compliant as well unless they are explicitly marked otherwise.
By default, Visual Studio adds the
<CLSCompliant> attribute to the
AssemblyInfo.vb file and sets its value to True.
Constructor
New(isCompliant)-
isCompliant(Boolean) Indicates whether the program element must be CLS-compliant
Property
- IsCompliant (Boolean)
Read-only. Indicates whether the program element must be CLS-compliant. Its value is set by the required
isCompliantparameter of the class constructor.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access