August 2002
Intermediate to advanced
576 pages
13h 54m
English
The System.CLSCompliantAttribute attribute is applied to program elements to indicate CLS compliance. An assembly that is CLS-compliant must specify the following global attribute:
[assembly:CLSCompliant(true)]
An assembly that doesn’t explicitly declare CLS compliance is assumed to be noncompliant. For multifile assemblies, CLS compliance needs to be declared only once. If the CLSCompliantAttribute attribute is specified multiple times with different values, a compile-time error is generated.
There is no need to specify the CLSCompliant attribute on every program element. A program element is assumed to have the same CLS compliance as its containing element. For example, a class defined within a compliant assembly is assumed ...
Read now
Unlock full access