473,387 Members | 1,465 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,387 software developers and data experts.

Ideas on commenting code ..

Hello!

I was wondering if there are any guidelines to documenting our C# code?

I'm not talking about the actual syntax for the Xml markup we add to the
classes, methods etc., but general guidelines for how the text should be
presented (aside from looking at the .NET framework obviously)?

--
venlig hilsen / with regards
anders borum
--
Nov 16 '05 #1
5 1411
Hi Anders,

AFAIK there are no guidelines on commenting. I usually go to MSDN and find
out how MS has documented an entity.
For example, if I am documenting an enumeration, then I would go to some
enum in MSDN (like MessageBoxIcon or so) and find out the tense, sentence
formation etc. used and then follow that in my documentation.

HTH,
Rakesh Rajan

"Anders Borum" wrote:
Hello!

I was wondering if there are any guidelines to documenting our C# code?

I'm not talking about the actual syntax for the Xml markup we add to the
classes, methods etc., but general guidelines for how the text should be
presented (aside from looking at the .NET framework obviously)?

--
venlig hilsen / with regards
anders borum
--

Nov 16 '05 #2
Hi Rakesh

This is also the approach I'm currently using, but thought I'd ask the
community for pointers. Documenting code is very important and should be
emphasized to the programmers (in my oppinion). Maybe I should write a small
guide and put it online .. hmm!

--
venlig hilsen / with regards
anders borum
--
Nov 16 '05 #3
Hi Anders,

This is very true.

Do go ahead - I feel we really need some ref. which puts down guidelines on
how the language should be while documenting with respect to different
constructs.

Regards,
Rakesh Rajan

"Anders Borum" wrote:
Hi Rakesh

This is also the approach I'm currently using, but thought I'd ask the
community for pointers. Documenting code is very important and should be
emphasized to the programmers (in my oppinion). Maybe I should write a small
guide and put it online .. hmm!

--
venlig hilsen / with regards
anders borum
--

Nov 16 '05 #4
I recently wrote a snippet in my blog that deals with this. There is a C#
example available which illustrates the styles I use. I have been creating
developer tools that provide source code for over eight years now so I'm
used to having people looking at my stuff.

I use NDoc to take the generated XML and format it into an MSDN style help
file. I find this method very effective.

http://bobpowelldotnet.blogspot.com/
--
Bob Powell [MVP]
Visual C#, System.Drawing

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml


"Anders Borum" <a@b.dk> wrote in message
news:e$**************@TK2MSFTNGP15.phx.gbl...
Hello!

I was wondering if there are any guidelines to documenting our C# code?

I'm not talking about the actual syntax for the Xml markup we add to the
classes, methods etc., but general guidelines for how the text should be
presented (aside from looking at the .NET framework obviously)?

--
venlig hilsen / with regards
anders borum
--

Nov 16 '05 #5
Hello Bob,

Thanks for pointing to your site. I'll check your ideas out!

--
venlig hilsen / with regards
anders borum
--
Nov 16 '05 #6

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

Similar topics

46
by: Profetas | last post by:
Hi, I know that this is off topic. but I didn't know where to post. Do you comment your source code while coding or after coding. for example: you write a procedure and after it is...
3
by: Naveen Mukkelli | last post by:
Hi All, I'm trying to create XML commenting for my code using XML commenting feature for the first time. I'm using VS.NET 2003 and C#. I'v tried the following way. Step 1: set the file name...
18
by: Marian F. | last post by:
The 12 years old genius function to count english words in a sentence: ' This is my function to count english words in your string ' s is the string with your words to be counted ' Returns an...
100
by: Angel Tsankov | last post by:
Can someone recommend a good source of C/C++ coding style. Specifically, I am interested in commenting style and in particular how to indent comments and the commented code, rather than when to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.