The complete set of CLS rules are collected here for reference. Recall that these rules apply only to "externally visible" items—types that are visible outside of their own assembly and members of those types that have public, family, or family-or-assembly accessibility. Furthermore, items can be explicitly marked as CLS-compliant or not using the System.CLSCompliantAttribute
. The CLS rules apply only to items that are marked as CLS-compliant.
-
CLS rules apply only to those parts of a type that are accessible or visible outside of the defining assembly. ([§I.7.3])
-
Members of non-CLS compliant types shall not be marked CLS-compliant. ([§I.7.3.1])
-
Boxed value types are not CLS-compliant. ([§I.8.2.4].)