System.CLSCompliantAttribute
E697438
System.CLSCompliantAttribute is a .NET attribute used to indicate whether code elements comply with the Common Language Specification for cross-language interoperability.
Statements (49)
| Predicate | Object |
|---|---|
| instanceOf |
System.Attribute subclass
ⓘ
attribute class ⓘ |
| appliesTo |
assemblies
ⓘ
classes ⓘ delegates ⓘ enums ⓘ events ⓘ fields ⓘ interfaces ⓘ methods ⓘ modules ⓘ parameters ⓘ properties ⓘ return values ⓘ structs ⓘ |
| assembly |
System.Runtime
NERFINISHED
ⓘ
mscorlib NERFINISHED ⓘ |
| attributeUsageAllowMultiple | false ⓘ |
| attributeUsageInherited | true ⓘ |
| commonUsage |
[CLSCompliant(false)] on non-compliant APIs
ⓘ
[assembly: CLSCompliant(true)] ⓘ |
| defaultValueSemantics |
false indicates not CLS-compliant
ⓘ
true indicates CLS-compliant ⓘ |
| definedIn | System.Runtime.dll in .NET Core/.NET 5+ NERFINISHED ⓘ |
| documentation | documented on Microsoft Learn ⓘ |
| effect |
causes compiler to check CLS rules
ⓘ
causes compiler to emit CLS compliance warnings ⓘ |
| hasConstructor | CLSCompliantAttribute(bool isCompliant) NERFINISHED ⓘ |
| hasProperty | IsCompliant ⓘ |
| introducedIn | .NET Framework 1.0 NERFINISHED ⓘ |
| isCompileTimeHint | true ⓘ |
| isMetadataAttribute | true ⓘ |
| isRuntimeEnforced | false ⓘ |
| language |
C#
NERFINISHED
ⓘ
VB.NET NERFINISHED ⓘ |
| namespace | System NERFINISHED ⓘ |
| platform |
.NET 5+
ⓘ
.NET Core NERFINISHED ⓘ .NET Framework NERFINISHED ⓘ |
| propertyType | IsCompliant: System.Boolean ⓘ |
| purpose | indicate Common Language Specification compliance ⓘ |
| relatedSpecification | Common Language Specification NERFINISHED ⓘ |
| scopeRule |
applied at assembly level sets default for contained types
ⓘ
applied at type or member level overrides containing scope ⓘ |
| supports | cross-language interoperability ⓘ |
| usedBy |
C# compiler
ⓘ
VB.NET compiler NERFINISHED ⓘ other CLS-aware .NET compilers ⓘ |
| visibilityRule | primarily relevant for publicly exposed APIs ⓘ |
Referenced by (1)
Full triples — surface form annotated when it differs from this entity's canonical label.