Type Summary

						public sealed class CLSCompliantAttribute : Attribute
{
  // Constructors
     public CLSCompliantAttribute (bool isCompliant);

  // Properties
     public bool IsCompliant { get; }
}

BA Unfortunately, we codified the naming convention for acronyms too late to fix this one. It should have been ClsCompliantAttribute rather than CLSCompliantAttribute.

Notice that this attribute is just a marker intended for compilers to enforce. The runtime does enforce any CLS-compliance rules.

JR Note that the CLS only applies to publicly exposed members so compilers generally only check CLS-compliance of types and members that are exposed outside of an assembly. Internal types and private methods, for example, are not checked for CLS compliance.

Get .NET Framework Standard Library Annotated Reference, Volume 1: Base Class Library and Extended Numerics Library 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.