473,513 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Difference between <summary> and <value> tags

I really do not understand the difference between the <summary> and <value>
XML document tags for a property. Why would one use one as opposed to the
other for a property, and when would one use both ?
Nov 16 '05 #1
4 3868
Edward,

The two tags are completely different. Summary is used to summarize
what the item it is attached to is (in this case, the property itself).
Value is used to indicate what exactly the value is that the property
get/sets.

If you want to relate it to the MSDN documentation, the summary tag is
the first paragraph before the code declaration, while the value tag will
appear under the "property value" header further down in the documentation.

Summary should give a general overview, while value should give a
detailed explaination about the property.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Edward Diener" <di***************@ORsoftware.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I really do not understand the difference between the <summary> and <value>
XML document tags for a property. Why would one use one as opposed to the
other for a property, and when would one use both ?

Nov 16 '05 #2
I use the <summary> tag to describe what the property provides.

I use the <value> tag to explain what the values coming back mean.

Perhaps the clearest example would be for a boolean property:

<summary>Gets and indication of whether the object is
initialized.</summary>
<value><c>true</c>if the object is initialized; <c>false</c> if it is
not.</value>

Notice that the summary tells you what the property does for you. Value
tells you what the various possible values mean. Sometimes the two
descriptions are almost identical, but often there are special values
or an enumerated list of values. In these cases, the value tag provides
detailed information about what each value means.

Nov 16 '05 #3

"Bruce Wood" <br*******@canada.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I use the <summary> tag to describe what the property provides.

I use the <value> tag to explain what the values coming back mean.

Perhaps the clearest example would be for a boolean property:

<summary>Gets and indication of whether the object is
initialized.</summary>
<value><c>true</c>if the object is initialized; <c>false</c> if it is
not.</value>

Notice that the summary tells you what the property does for you. Value
tells you what the various possible values mean. Sometimes the two
descriptions are almost identical, but often there are special values
or an enumerated list of values. In these cases, the value tag provides
detailed information about what each value means.
Understood. But regarding properties which can be any value within the range
which the type of the property provides, very often the summary explains the
value. Nonetheless your point, about value being an explanation of the
possible values of the property, is well taken. Thanks !

Nov 16 '05 #4
In commenting my code today I also noticed that a great use of the
<value> clause is to indicate what value comes back when the property
returns "nothing" in semantic terms.

For example, a property that returns a collection of "selected items":
what does it do if nothing is selected? Does it return an empty
collection, or a null reference? I use the <value> clause to document
this behaviour, which is more common than the true / false example I
gave above.

However, important information that would help the caller understand
how to use the property, such as units of measure, should be in the
<summary> section, as this is what appears in Intellisense as a tool
tip when the user mouses over your property name.

Nov 16 '05 #5

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

Similar topics

25
4994
by: Shannon Jacobs | last post by:
Maybe there is a simple trick here, and I'm not spotting it... Is there a guru of CSS hanging around here who can help out? The page in question has a multi-column table with a list of links in...
1
1802
by: Bob Rundle | last post by:
The following construct generates a good XML file, but "Build Comment Web Pages..." does not do anything sensible with the <see> tag. Is there a bug in this tool? Bob Rundle using System;...
1
1706
by: MSolve1 | last post by:
Hi, People I'd like to restrict the contents of an element to a list of string values delimited by a space such as the one below: <tables>summary positions trades</tables> So I defined the...
0
3474
by: webmaster | last post by:
Pardon my being a total C# noob. I'm trying to take apart the dotNet Time Tracker dotNet C# starterkit sample application and replicate a part of the code. At a high level, I have a very...
8
1878
by: Scott M. | last post by:
Where will code that is preceded with: /// <example> /// some comments /// </example> actually show up? I can see my <summaryand <remarkscode showing up in the code comment pages and in...
4
4315
by: Christofer Dutz | last post by:
Hi, I am having a small problem, that is driving me nuts. My application reads some Xml and runs 2 Xsl Transformations to generate HTML. As soon as my second XSL introduces some <br/tags, the...
1
2403
by: mark4asp | last post by:
<form runat="server"automatically adds <divtag to code contained within. Is there a way to stop that? Mixing block-level elements with inline-level elements messes up the HTML becasuse that is...
44
39126
by: Zytan | last post by:
The docs for List say "The List class is the generic equivalent of the ArrayList class." Since List<is strongly typed, and ArrayList has no type (is that called weakly typed?), I would assume...
0
7267
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
7391
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
7553
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...
1
7120
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
7542
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...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1609
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
466
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.