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 (4)

How this entity was disambiguated

Statements (46)

Predicate Object
instanceOf metadata annotation mechanism
programming language feature
accessedWith System.Reflection
surface form: System.Reflection API
appliesTo assembly
class
constructor
delegate
enum
event
field
interface
method
module
parameter
property
return value
struct
baseTypeForCustomAttributes C# attributes self-linksurface differs
surface form: System.Attribute
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 Framework
surface form: .NET
exampleAttribute Microsoft.AspNetCore.Mvc.HttpGetAttribute
NUnit.Framework.TestAttribute
System.AttributeUsageAttribute
System.CLSCompliantAttribute
System.Diagnostics.ConditionalAttribute
System.ObsoleteAttribute
C# attributes self-linksurface differs
surface form: System.Runtime.InteropServices.DllImportAttribute

System.Runtime.Serialization.DataContractAttribute
System.SerializableAttribute
C# attributes self-linksurface differs
surface form: System.Xml.Serialization.XmlElementAttribute
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# programming language
surface form: C#

How these facts were elicited

Referenced by (4)

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

ECMA-334 scope C# attributes
C# attributes baseTypeForCustomAttributes C# attributes self-linksurface differs
this entity surface form: System.Attribute
C# attributes exampleAttribute C# attributes self-linksurface differs
this entity surface form: System.Runtime.InteropServices.DllImportAttribute
C# attributes exampleAttribute C# attributes self-linksurface differs
this entity surface form: System.Xml.Serialization.XmlElementAttribute