Solved

What happens to comments when building a solution or project?

Posted on 2006-11-28
1
189 Views
Last Modified: 2010-04-23
Hi All,

I was just wondering what happens to comments and debug statements when a project is compiled. I notice that during a "release" build, debug statements i.e debug.writeline, are not executed.

Does this mean that they are not compiled with the app??

If they are, how can the app be compiled without the comments in the release build, but retained for the dev environment.

Please could someone explain without posting millions of links here.
0
Comment
Question by:nzfire
1 Comment
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 18031055
>Does this mean that they are not compiled with the app??
correct.

the compiler knows that the debug statements are not for a compiled version, and simply ignores them.
but in the source code, they will stay of course
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now