Attribute
noun
say it: “AT-rih-byoot” /ˈætrɪbjuːt/
A label in square brackets on a C# class, method or property, such as [TestMethod], that tools and frameworks read.
What is Attribute in C#?
Attribute — Metadata attached to C# declarations for compilers, tools, or runtime code.
class Checkout
{
[Obsolete]
void OldCheckout()
{
}
}
In a sentence
- “The attribute [Required] tells ASP.NET Core the Name property must have a value.”
Level: Master · More C# terms at this level
Updated