attribute

A tag in square brackets, such as [Required] or [HttpGet], that attaches extra information to code for the compiler or framework to read.

In more detail

Attributes do nothing on their own; some other code has to look for them, often through reflection. ASP.NET Core reads attributes to route controller actions, bind parameters and validate models.

Related terms

Taught in

References