Need help on VSS Documentation.....

  • Thread starter Thread starter Mohasen Sani
  • Start date Start date
M

Mohasen Sani

What is the difference between Attribute and Property in the documentation?
IF you have installed VS 2003 please paste the URL in the browser address
bar.


ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/DHTML/workshop/author/dhtml/r
eference/objects/body.htm

Mosen Sani
 
Properties are part of a class (variables to be crude)

Attributes are specific bits of code marked for other pieces of code to run
outside of normal calling paths. Normally, we are talking reflection with
attributes. Download nunit off SourceForge to get a really good example of
how Attributes are used.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside the box!
*************************************************
 
For the most part there isn't. The terms are interchangable.

In the most technical of senses, "attributes" is used when talking about
declerative (XAML) or markup languages (HTML/XML). They referer to values
within an element tag:

<a href="yyy" />
<asp:button onClick="zzz" .../>

here href and onClick are attributes.

However, when you move to an OO model, these same attributes are normally
exposed as properties

public strig HRef{
get { return hRef; }
set {hRef = value;
}

Karl
 
Gregory,
Looking at the help link he provided, I think he was refering to attributes
like I explained them (XML and HTML element attributes). However you are
completely correct, attributes in .Net also have another specific meaning
which shouldn't be confused with either Properties or XML/HTML attributes.

Karl
 
Back
Top