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
isCompliant
parameter of the class constructor.
Get VB.NET Language in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.