PDA

Click to See Complete Forum and Search --> : Object Browser - Can one do this?


StrangerInBeijing
Aug 4th, 2005, 09:34 PM
VS comes with a great tool looking at say a SDK, showing namespaces, classes, methods, etc, etc, nl. The Object Browser.

Sometimes one get to use an SDK of which the developer did not bother to document and the Object browser will show you nothing but say, a specific method's signature (access modifier, name, input params, return value).

So one do some research, and figure out what the specific method do, but you would like to document this information.

Wouldn't it be cool, if one could add your own "custom comments" to an object? Or is there another way or tool for something like this?

What I currently do is create a word doc., documenting the SDK, and fill in comments, sample code, etc as I go along. Would be nice if one could actually do these in VS.

crptcblade
Aug 5th, 2005, 04:15 AM
You can. Document your code using

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


above a method or declaration, fill in some comments and then click Tools->Build Comment Web Pages.

The IDE will do the rest.

StrangerInBeijing
Aug 5th, 2005, 04:21 AM
I guess I did not make myself very clear.

I was refering to dll's of which you do not have the source.

You add & reference the dll in your code, and view what is available in object browser.

I would like to be able to add my own comments, seeing many functions are not documented.

Just for my own use on my local machine.

wolfrose
Oct 5th, 2005, 01:19 PM
You can. Document your code using

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


above a method or declaration, fill in some comments and then click Tools->Build Comment Web Pages.

The IDE will do the rest.

Can you do this with Visual Basic?

jmcilhinney
Oct 5th, 2005, 06:55 PM
Can you do this with Visual Basic?This same functionality is native to VB.NET 2005 but not previous versions. There is an add-in for VS.NET 2003 (I'm not sure about 2002) that adds this functionality:

VBCommenter (http://www.gotdotnet.com/workspaces/workspace.aspx?id=112b5449-f702-46e2-87fa-86bdf39a17dd)

Some folks say that they've had issues with it but I've been using it for ages and never had a problem.

When you compile your projects, VB.NET or C#, the comments are rolled up into an XML file. You can use tools like NDoc (http://ndoc.sourceforge.net/), which is free, to generate a CHM file from that XML to give you documentation for your assemblies that resembles MSDN. I did just that with my compression library (http://www.vbforums.com/showthread.php?t=360169), which is wriiten in VB.NET and includes CHM documentation.