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

Answer Posted / vinay panchal

There are two Trace classes in the Microsoft .NET Framework
library: System.Diagnostics.Trace and
System.Web.TraceContext. These Trace classes are frequently
confused with each other. However, each one is used for a
specific purpose.

You typically use the System.Diagnostics.Trace class to
debug console applications or Windows Forms applications.
You use System.Web.TraceContext only in Microsoft ASP.NET
applications. To display Trace.Write statements on an
ASP.NET page from a Class Library, you must use the
System.Web namespace. The following examples describe how to
use Trace.Write from a Class Library in an ASP.NET application.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is attribute and reflection in c#?

459


Is c# the same as d flat?

493


What is the output of TextWriterTraceListener redirected?

532


What is Asynchronous call and how it can be implemented using delegates?

564


What are the generation of Garbage Collection in C# .NET ?

547






What is the property of a class in c#?

483


What are the steps to create an assembly and add it to the gac?

448


What is xor operator in c#?

504


What is msil, and why should developers need an appreciation of it if at all?

556


What is different about switch statements in c#?

481


What is string class in c#?

478


Explain code compilation in c#.

516


What you mean by inner exception in c#?

515


How is a string immutable?

480


What is c sharp used for?

481