C# attributes

E183358

C# attributes are metadata annotations in the C# programming language that allow developers to attach declarative information to code elements such as classes, methods, and properties, influencing compilation and runtime behavior.

All labels observed (5)

How this entity was disambiguated

Statements (46)

Predicate Object
instanceOf metadata annotation mechanism ⓘ
programming language feature ⓘ
accessedWith System.Reflection API ⓘ
linked to: System.Reflection
appliesTo assembly ⓘ
class ⓘ
constructor ⓘ
delegate ⓘ
enum ⓘ
event ⓘ
field ⓘ
interface ⓘ
method ⓘ
module ⓘ
parameter ⓘ
property ⓘ
return value ⓘ
struct ⓘ
baseTypeForCustomAttributes System.Attribute ⓘ
linked to: C# attributes
canInfluence compile-time behavior ⓘ
runtime behavior ⓘ
controls code analysis behavior ⓘ
interoperability behavior ⓘ
runtime frameworks behavior ⓘ
serialization behavior ⓘ
declaredBy class derived from System.Attribute ⓘ
definedIn .NET ⓘ
linked to: .NET Framework
exampleAttribute Microsoft.AspNetCore.Mvc.HttpGetAttribute ⓘ
NUnit.Framework.TestAttribute ⓘ
System.AttributeUsageAttribute ⓘ
System.CLSCompliantAttribute ⓘ
System.Diagnostics.ConditionalAttribute ⓘ
System.ObsoleteAttribute ⓘ
System.Runtime.InteropServices.DllImportAttribute ⓘ
linked to: C# attributes

System.Runtime.Serialization.DataContractAttribute ⓘ
System.SerializableAttribute ⓘ
System.Xml.Serialization.XmlElementAttribute ⓘ
linked to: C# attributes
purpose attach metadata to program elements ⓘ
retrievedVia reflection ⓘ
supportsCustomDefinitions true ⓘ
supportsMultipleOnSameTarget true (depending on AttributeUsage) ⓘ
supportsNamedParameters true ⓘ
supportsPositionalParameters true ⓘ
syntaxExample [AttributeUsage(AttributeTargets.Class)] ⓘ
[Obsolete] ⓘ
[Serializable] ⓘ
usedInLanguage C# ⓘ

How these facts were elicited

Referenced by (5)

Full triples — surface form annotated when it differs from this entity's canonical label.

ECMA-334 → scope → C# attributes ⓘ
C# attributes → baseTypeForCustomAttributes → System.Attribute ⓘ
linked to: C# attributes
C# attributes → exampleAttribute → System.Runtime.InteropServices.DllImportAttribute ⓘ
linked to: C# attributes
C# attributes → exampleAttribute → System.Xml.Serialization.XmlElementAttribute ⓘ
linked to: C# attributes
System.Reflection.TargetedPatchingOptOutAttribute → attributeUsage → AttributeTargets.Class ⓘ
linked to: C# attributes