I am just curious to know what is the difference between the debug class and the trace class. Don't they both check through code at compilation time? During which cases should each of the class methods be used?
Trace calls are (normally) left in when you do a release build. The Debug calls are (normally) removed when you do a release build.
If you open the project properties, go to the Build tab (if in VS.NET 2005) and see the checkboxes for the DEBUG and TRACE constants. The calls inside the framework are wrapped by these compilation constants, so when you select "Release" from the Configuration drop-down at the top of the dialog, you'll see that the TRACE one remains checked. As a result, the compiler will remove all calls to the Diagnostics.Debug class when you build.
Chip H.
____________________________________________________________________ If you want to get the best response to a question, please read FAQ222-2244 first
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.