Comments
-
Hi All: As everybody knows comments are vary crucial part of programming. Can anybody suggest how to write more professional comments with in your code? Any guideline? :) Vikas Garg
-
Hi All: As everybody knows comments are vary crucial part of programming. Can anybody suggest how to write more professional comments with in your code? Any guideline? :) Vikas Garg
For VS2005 or 2003 you can use the built in XML comments. for which you can get help from MSDN and you can use third part util to make documentation from these comments. like you can use NDoc util to genrate documents from XML Comments which is very handy and professional Nav.
-
Hi All: As everybody knows comments are vary crucial part of programming. Can anybody suggest how to write more professional comments with in your code? Any guideline? :) Vikas Garg
XML comments can be used for documentation, as mnaveed suggested. For comments in the code itself, focus on making it easy to find out what the different parts of the code does. Put yourself in the mind of someone who sees the code for the first time, has to locate a specific action in the code and find out how it's done (and what's wrong with it ;)). :: Comment what's unusual or complicated, not what is plain and simple. :: Explaining why something is done is often a more useful complement to the code than how it's done. Most of the time the code itself reveals how it's done, but seldom why. Well written code is also a form of documentation. If you choose good variable names, you don't have to write comments that explains what every variable is used for. --- b { font-weight: normal; }