CLSCompliantAttribute

CLSCompliantAttribute CF 1.0, ECMA 1.0, serializable

System (mscorlib.dll) sealed class

This attribute indicates that a program element is compliant with the CLS. If you use non-CLS-compliant classes (such as UInt32 ) in a class marked as compliant, the compiler generates a compliance warning.

By default, types without this attribute are not CLS-compliant unless they are contained in a CLS-compliant type or assembly. You can specifically mark non-CLS-compliant members inside a CLS-compliant type using [CLSCompliant(false)] .

 public sealed class  CLSCompliantAttribute  : Attribute {  // Public Constructors  public  CLSCompliantAttribute  (bool   isCompliant   );  // Public Instance Properties  public bool  IsCompliant  {get; } } 

Hierarchy

Object Attribute CLSCompliantAttribute

Valid On

All



C# in a Nutshell
C # in a Nutshell, Second Edition
ISBN: 0596005261
EAN: 2147483647
Year: 2005
Pages: 963

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