PC Review


Reply
Thread Tools Rate Thread

description in the code

 
 
Jeff
Guest
Posts: n/a
 
      20th Nov 2007
hey

..NET 2.0

I'm wondering if it is possible to add some description to the code. Text
which describe for example what a property of a class does etc - I don't
mean comments

Lets say I have this code <lets say it is from a class named Car>;
private string _plate;
public string Plate
{
get { return _plate; }
set { _plate = value; }
}

Now if some other programmers try to access this Plate property, then I
would like to add a description which appear as tooltip when the user types
Car. and in the typeahead showing the available methods and properties
available, so when the programmer scroll down to "Plate" in the list a
tooltip could for example display "Returns a cars vehicle registration
plate"

The clue is that I think this would make the code easier to understand for
other developers, they don't have to open the Car class to see what's going
on....

any ideas if this is possible?


 
Reply With Quote
 
 
 
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      20th Nov 2007
On Nov 20, 8:05 am, "Jeff" <do...@spam.me> wrote:
> .NET 2.0
>
> I'm wondering if it is possible to add some description to the code. Text
> which describe for example what a property of a class does etc - I don't
> mean comments


In fact, you *do* mean comments - XML documentation comments.

Type /// just above the property declaration, and VS will create a
template of:

/// <summary>
///
/// </summary>

You can then type between the summary open/closing tags. There are
other tags available - see "XML documentation comments" in MSDN for
more details. Note that if you're going to use the project from other
solutions, you'll need to build the XML file with the same name as the
DLL; look in the property pages for the project for the option to
enable this.

Jon
 
Reply With Quote
 
Peter Macej
Guest
Posts: n/a
 
      20th Nov 2007
Just as an addition to Jon's post. XML comments will also automatically
appear in Object browser, see http://tinyurl.com/ywtomx

Moreover, you can generate MSDN-like documentation with F1 functionality
out of your XML comments, see e.g.
http://www.helixoft.com/vsdocman/examples.html

You can use various tools for this task, including our VSdocman.

--
Peter Macej
Helixoft - http://www.helixoft.com
VSdocman - Commenter and generator of class documentation for C#, VB
..NET and ASP .NET code
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need description instead of code to show KevinS Microsoft Access Queries 3 18th Jun 2009 03:14 PM
Change abbreviated code to its code description Jewel Microsoft Access Getting Started 2 5th Feb 2009 10:33 PM
Drop Down list with Code Description BigFish311@gmail.com Microsoft Excel Misc 4 13th Aug 2008 04:24 PM
exam code and description =?Utf-8?B?S2lyYW4=?= Microsoft ASP .NET 3 17th Jul 2007 05:23 AM
Type in code and get description in next cell - Please help ,thanks. Briggsy Microsoft Excel Discussion 2 25th Aug 2004 08:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:36 PM.