473,396 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Comments on XML Documentation Comments (no pun intended)

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
ones, for example) be commented?
Nov 15 '05 #1
3 1332
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
"C# Learner" <cs****@learner.here> wrote in message
news:um**************@tk2msftngp13.phx.gbl...
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
ones, for example) be commented?

Nov 15 '05 #2
> Thanks for your reply.

Hmm... I've still not fully made up my mind about how far to take the
XML documentation comments thing. As I see it currently, commenting
only *some* methods and not others looks a bit "odd". I guess my mind
is trying to treat the comments as method delimiters, in a way.


Is this code that will eventually be distributed, or reviewed by someone
else? If so, comment -every- method with summary and param tags - be brief
and concise. Then, pick and choose the more important methods to include
stuff like example tags, if you plan on building proper documentation.

Again, it depends on what you are going to do with your code.

Erik
Nov 15 '05 #3
Erik Frey wrote:
Is this code that will eventually be distributed, or reviewed by someone
else? If so, comment -every- method with summary and param tags - be brief
and concise. Then, pick and choose the more important methods to include
stuff like example tags, if you plan on building proper documentation.

Again, it depends on what you are going to do with your code.


Well, what I'm thinking here is /general/ code written by me, which is
basically code that only *I* will maintain.

I think, for this context, I'll stick to only using method comments when
the name of the method can't describe it enough. For anything I give
out I'll take your advice.

Thanks.
Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Monk | last post by:
Hi, Have a query regarding comments that extend over multiple-lines. Would like to know if the standard's view of this, so that we can create a code which doesn't run into compiler specific...
4
by: Paul Speranza | last post by:
Can anyone tell me the proper way to document enums so that the compiler won't warn me when I have it generate an xml file for help? For the following code... /// <summary> /// This is the...
0
by: MS | last post by:
Is the schema used to validate XML Documentation Comments available to be changed by a VS.Net user? I suspect the this question is no so have a couple of requests: 1.) I use #region...
2
by: Philippe Bertrand | last post by:
I tried following the pattern in MSDN and it just plain doesn't work. I replaced the comments for a class with an include tag but did not change any of the comments on the members of the class...
0
by: Ralf Jablonski | last post by:
Hello, using VC++ 2003 all source code comments in front of eg. a class method has been visible in intellisense and object browser. After converting the project to whidbey, the source code...
3
by: ano | last post by:
Hi all, I try to add an XML fragment into C# Documentation Comments like this: /// <example> ///<code> ///<book> /// <name>Book1</name> ///</book> ///</code>
1
by: jarnie | last post by:
I have the VB 2005 Express Edition, and have been looking at how to add XML Documentation to my projects. After reading a few articles I have found, it appears that 2005 introduced native support...
1
by: Alex Chun | last post by:
How can I add comments / documentation to an Access database, so that the next person programming the database will understand what s/he is looking at? For example, I might have a select query,...
1
by: shaileshkumar | last post by:
i read in one of the notes that comments /** */ are used for documentation and is used by javadoc tool. i have a class by name Simple.java i used the command javadoc Simple.java...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.