Is there any program/module that shows the comments in the source code?

Hi there;

I am dealing massive amount code both in C# and Java.
The codes are very well commented but sometimes I add some silly comments to track during running.

So;

Is there any program/module that shows the comments in total in the source code in C# and Java?

Kind regards.

LVL 12
jazzIIIloveAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
When compiled the comments lines should be removed (just excess baggage, they don't do anything).
So if I understand your requirement correctly - no.


ps.  Comments are not the same as output to trace for example.
0
 
Easwaran ParamasivamConnect With a Mentor Commented:
For comments with // and /* there is no built in tool available. But for XML documentation (with ///) there is build in option there to generate the documentation file.

http://www.codeproject.com/KB/XML/csharpcodedocumentation.aspx

If you want to get the // and /* comments then write a program using regex.

http://www.radsoftware.com.au/articles/regexsyntaxadvanced.aspx
0
 
for_yanConnect With a Mentor Commented:
If you need to track anything during runtime
you don't want to add comments but
you should add suh line


System.out.println("youur comment specifying the location in the program");  //printout

After you debugged your program it is easy to find all
lines with //printout
and delete them or comment them out from the start of the line

I am of course writing about Java; I'm sure you can do something similar in C#
0
 
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
>>I'm sure you can do something similar in C#

Yes, it is called Trace (see the first comment)
0
 
CEHJConnect With a Mentor Commented:
>>but sometimes I add some silly comments to track during running.

I assume you mean some kind of runtime output.

Any professional code has logging built into it. If you're using C# as well, i suggest using log4j and log4net
0
All Courses

From novice to tech pro — start learning today.