473,399 Members | 4,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

C# terminology: attribute versus field

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
Nov 16 '05 #1
3 2617

"Neil Zanella" <nz******@gmail.com> wrote in message
news:1a*************************@posting.google.co m...
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.
Nov 16 '05 #2
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
Nov 16 '05 #3

"Daniel O'Connell [C# MVP]" <onyxkirx@--NOSPAM--comcast.net> wrote in
message news:uh****************@TK2MSFTNGP15.phx.gbl...

"Neil Zanella" <nz******@gmail.com> wrote in message
news:1a*************************@posting.google.co m...
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".
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Steve Jorgensen | last post by:
Terminology question: Is there a term for a set of records related directly or indirectly by key value in several tables? For example, a single invoice record and its line item records -or- a...
15
by: Gérard Talbot | last post by:
Hello all, I'd like to know and understand the difference between, say, <img src="/ImageFilename.png" width="123" height="456" alt=""> and <img src="/ImageFilename.png" style="width:...
33
by: Joshua D. Drake | last post by:
Hello, I think the below just about says it all: http://www.commandprompt.com/images/mammoth_versus_dolphin_500.jpg Sincerely, Joshua Drake
2
by: Isz | last post by:
Hi Group: I would like to know if it is possible to change the name of an attribute to something else. My setup is like this: I have serveral SQL tables that I nest and join so that it all...
8
by: shumaker | last post by:
I see other posts where some say fields that will hold a number with leading zeros should be stored as text instead of numbers. This is very inefficient though, as a string of digit characters...
5
by: Neil Norfolk | last post by:
I am using C# in Visual Studio 2003. I would like to serialize a class that contains, amongst other things, public delegate void DocumentsPreferencesChange(object env, Documents e); public event...
97
by: xahlee | last post by:
I'd like to introduce a blog post by Stephen Wolfram, on the design process of Mathematica. In particular, he touches on the importance of naming of functions. • Ten Thousand Hours of Design...
0
by: JimP | last post by:
I'm importing XML files into a SQLExpress DB using SQLXML and VB.net 2005. I have a simple *.xsd schema file that is pulling in all attributes from the <Activityelement. It also has a...
1
by: Florian Paulus | last post by:
Hi group, i'm wondering how to assign an attribute to a field that a class inherited from a base class. Say base class has a field protected string message, so in the derived class i want to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.