"Daniel O'Connell [C# MVP]" <onyxkirx@--NOSPAM--comcast.net> wrote in
message news:uhMC%(E-Mail Removed)...
>
> "Neil Zanella" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hello,
>>
>> I would like to ask a question pertaining to some C# terminology. My
>> reference
>> book says that within a class, attributes are the same as fields. I would
>> like
>> to know what the standard stays with regards to this terminology.
>> According to
>> the ECMA C# standard, what is the difference between attribute and field.
>
> The spec says that fields are variables associated with a class and that
> attributes are declarative peices of information associated with the
> class.
>
> Fields: http://www.jaggersoft.com/csharp_standard/8.7.2.htm
> Attributes: http://www.jaggersoft.com/csharp_standard/8.14.htm
>
> I believe fields and attributes are used interchangably in some languages
> and books, but the spec does not do so. It clearly defines each.
"Attribute" is general OO terminolgy, not used in any of the common
C++-derived langagues. C# and Java calls them "fields", while c++ uses
"member variables".