CLSCompliant Attribute


CLSCompliant Attribute

Class

System.CLSCompliantAttribute

Applies To

All elements

Constructor

     New(isCompliant) 


isCompliant (required; Boolean)

Indicates whether the program element is CLS-compliant

Property


IsCompliant (Boolean)

Read-only. Value from the isCompliant constructor parameter.

Description

The <CLSCompliant> attribute indicates whether the program element complies with the Common Language Specification (CLS). If the <CLSCompliant> attribute is not present, the VB compiler does not enforce CLS compliance. This can prevent other languages from successfully accessing components written in VB.

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.




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net