PC Review


Reply
Thread Tools Rate Thread

C# terminology: attribute versus field

 
 
Neil Zanella
Guest
Posts: n/a
 
      31st Dec 2004
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.

Thank you for your clarifications,

Regards,

Neil
 
Reply With Quote
 
 
 
 
Daniel O'Connell [C# MVP]
Guest
Posts: n/a
 
      31st Dec 2004

"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.


 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      31st Dec 2004
Neil,

Be aware that this is as long as it is inside C# this does not mean that
that is directly a definition for the terminology when used with C# in a
database or by instance HTML.

Daniel,

Thanks for the link from me as well, good information, looks great

Cor


 
Reply With Quote
 
Mike Schilling
Guest
Posts: n/a
 
      2nd Jan 2005

"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".


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine field from attribute Mihajlo Cvetanović Microsoft C# .NET 4 19th Feb 2010 12:05 PM
memo versus text field Frank Bobak Microsoft Access 4 21st Jan 2005 09:07 PM
UserControl Tag Attribute versus PageLoad sequence Luis Ferrao Microsoft ASP .NET 0 3rd Jan 2005 04:14 PM
NonSerialized field attribute in VB.NET Crispin Horsfield Microsoft VB .NET 2 29th Dec 2003 01:15 PM
attribute and field help Rebecca Microsoft Access Forms 1 3rd Sep 2003 08:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:32 PM.