- Attribute (computing)
In
computing , an attribute is a specification that defines a property of an object, element, or file. An attribute of an object usually consists of a name and a value; of an element, a type or class name; of a file, a name and extension.* Each named attribute has an associated set of rules called operations: one doesn't "add characters" nor manipulate and process an
integer array as an image object— one doesn't process text as type floating point (decimal number] s).*It follows that an object definition can be extended by imposing data typing: a representation format, a default value, and legal operations (rules) and restrictions (Division by zero is not to be tolerated!) are all potentially involved in defining an attribute, or conversely, may be spoken of as attributes of that object's type. A file of type .jpgis not decoded by the same operations (however similar they may be—these are all graphics data formats) as the file extension type .pngor .BMP, nor is a floating point typed number operated upon by the rules applied to type long integer.
For example, in
computer graphics , line objects can have attributes such as "thickness" (with real values), "color" (with descriptive values such as "brown" or "green" or values defined in a certaincolor model , such as RGB), "dashing attributes", etc. A circle object can be defined in similar attributes plus anorigin andradius .Markup languages, such as
HTML andXML , use attributes to describe data and the formatting of data.Attributes in C#
In the C# programming language, attributes are
metadata attached to a field or a block of code, equivalent to annotations in Java.ee also
*Attributes in HTML
*Extended file attributes
*Field (computer science)
Wikimedia Foundation. 2010.