Re: Difference between <summary> and <value> tags

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Bruce Wood (brucewood_at_canada.com)
Date: 01/25/05


Date: 25 Jan 2005 11:13:45 -0800

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.



Relevant Pages

  • Re: [coding practises] do you declare your superclass "throws"??
    ... Right now you sometimes can't test a change or comment out one line of code without commenting out a whole block of code somewhere else, AND another line or two in other places, in a manner that is somewhat awkward. ... I suppose a workaround is to have a dummy finally clause containing only a comment on every try block that doesn't have a "real" finally clause. ... Warnings make sense in all of these cases both to catch this sort of temporary hack before release so it can be removed or otherwise fixed and to catch some unrelated and common bad coding practises, such as to catch and discard actually-thrown exceptions without taking any action. ... Reducing the error to a warning for the specific case of a catch clause for an unthrown exception would be a fairly narrow and specific change and doesn't seem wholly unjustified. ...
    (comp.lang.java.programmer)
  • Re: Alternative COBOL "telco" source program
    ... >>use a usage clause under a group level item with a value clause. ... > I use Value only to initialize constants i.e. fields that will never change. ... > If the caller does a Cancel, Values will be there on the next Call. ... 'pic 1' seems like sufficient information for the compiler to define one ...
    (comp.lang.cobol)
  • Re: Alternative COBOL "telco" source program
    ... >use a usage clause under a group level item with a value clause. ... I use Value only to initialize constants i.e. fields that will never change. ... If the caller does a Cancel, Values will be there on the next Call. ... 'pic 1' seems like sufficient information for the compiler to define one ...
    (comp.lang.cobol)
  • Re: Photos
    ... "especially where spouses are involved" clause. ... Hopefully Rajesh has ... Beyond commenting and "supervising", he doesn't really do much, ...
    (rec.pets.dogs.behavior)