Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-09-06
5
Medium Priority
?
208 Views
Last Modified: 2012-05-12
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.

0
Comment
Question by:jazzIIIlove
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 800 total points
ID: 36487522
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
 
LVL 16

Assisted Solution

by:Easwaran Paramasivam
Easwaran Paramasivam earned 400 total points
ID: 36487565
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
 
LVL 47

Assisted Solution

by:for_yan
for_yan earned 400 total points
ID: 36487633
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
 
LVL 44

Assisted Solution

by:AndyAinscow
AndyAinscow earned 800 total points
ID: 36487661
>>I'm sure you can do something similar in C#

Yes, it is called Trace (see the first comment)
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 400 total points
ID: 36487672
>>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

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question