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 ? 4 3887
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.co m
"Edward Diener" <di************ ***@ORsoftware. com> wrote in message
news:%2******** ********@tk2msf tngp13.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 ?
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>tru e</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.
"Bruce Wood" <br*******@cana da.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.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>tru e</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 !
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 each
column. Because links are added and deleted separately in each column, it
would be exceedingly awkward to use a separate table row for each link.
Therefore, within each column the links are separated by <br> tags. However,
the automatic line...
|
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;
using System.Diagnostics;
namespace DotnetBench
{
|
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 following schema:
....
|
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 simple SQL server table and stored
procedure which I have no problems binding from directly from an
ASP.NET control...
Table BOOK
|
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 the Object Browser, but where will the example come into play?
| |
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 application
crashes with the same error message I would get when writing <brand no
closing tag. To make everything a little stranger, even <br></brseems to
be bad while <lbr/is fine. Ive tried some other tag names and the problem
only appears with...
|
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 invalid for a strict implementation. <spanis
in-line-level and <divis block-level. I don't want to mix up <span>
and <div>
I'm using an <asp:Buttonhere because when it switches to the URL I
need to check that the user is in the correct role -...
|
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 List<is far
better. So, why do people use ArrayList so often? Am I missing
somehing? What's the difference between them?
Zytan
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
| |
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |