Groups | Blog | Home
all groups > c# > february 2004 >

c# : Comments on XML Documentation Comments (no pun intended)



Rick Strahl [MVP]
2/28/2004 1:07:02 PM
Documenting a class is not all that useful in most cases. It makes more
sense to document the functionality which sits in methods.

I personally try to document everything although I use a more formal
approach with Help Builder (www.west-wind.com/wwhelp/) into which I import
the Xml documentation and then usually further document it there.

It all depends on who the docs are for, but generally the more the merrier
<g>.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web


[quoted text, click to view]

C# Learner
2/28/2004 9:49:20 PM
What are your views on XML documentation comments?

I always comment every class using <summary> tags, and comment *some*
methods. A lot of C# code that I've seen written by others uses
appropriate XML documentation comments for *every* method.

What do you think about this? Should _every_ method (including private
Jon Skeet [C# MVP]
2/29/2004 7:40:16 AM
[quoted text, click to view]

Yes, I believe so. I document absolutely everything, with the exception
of fields which solely exist to back properties - assuming that the
description of the field would be the same as for the property.

Don't forget that documentation isn't just helpful to other people -
it's likely to be helpful to you if you come back to the code in a
year's time. That's why even private methods should be documented.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
C# Learner
2/29/2004 7:58:22 AM
[quoted text, click to view]

Interesting to know.

[quoted text, click to view]

In fact that's what was on my mind when I started this thread.

[quoted text, click to view]

I'll give a try - documenting everything in the little project I
released as open-source and see what I think.

As a side thought, I think code writing /style/ occupies my mind too
often :)

AddThis Social Bookmark Button