O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required