What?s the difference between the Debug class and Trace class?

Answer Posted / kabita

Debug Class provides a set of methods and properties that
help debug your code. If you use methods in the Debug class
to print debugging information and check your logic with
assertions, you can make your code more robust without
impacting the performance and code size of your shipping
product. In Visual Studio 2005 projects, creating a debug
build enables Debug.


You can use the properties and methods in the Trace class
to instrument release builds. Instrumentation allows you to
monitor the health of your application running in real-life
settings. Tracing helps you isolate problems and fix them
without disturbing a running system.
In Visual Studio 2005 projects, Trace is enabled by default
for both release and debug builds, so code is generated for
all trace methods in both release and debug builds.
Therefore, you can use Trace to instrument release builds.

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If I want to override a method one of class A and in class b then how do you declare?

741


What is the default value of decimal in c#?

484


What is the c# equivalent of c++ catch (…), which was a catch-all statement for any possible exception? Does c# support try-catch-finally blocks?

506


Difference between call by value and call by reference in C#?

518


Which attribute adorn a test class to be picked up by the NUnit GUI in the NUnit test framework?

549






Can a sealed class be used as a base class?

527


Is it possible to force garbage collector to run?

480


What does get set mean in c#?

491


What is pure abstract class in c#?

451


What is the difference between do and while loop?

442


Can a struct have a default constructor (a constructor without parameters) or a destructor in c#?

513


Which is the best language for desktop application?

468


What is an array class?

514


How to generate strong name key file or which command is used to generated strong name key file?

510


What is the difference between final finally and finalize in c#?

446