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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / surojit

What’s the difference between the Debug class and Trace
class? Documentation looks the same. Use Debug class for
debug builds, use Trace class for both debug and release
builds.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More C Sharp Interview Questions

What is writeline in c#?

0 Answers  


what is webapplication? what is windows application? what is the extension for both . in what purpose we r using webapplication. in which situation we r using windowns application

1 Answers  


How do you create multiple inheritance in C#?

5 Answers   Infosys, KenIndia, Microsoft,


how do you do exception management

4 Answers   Accenture, HCL,


What is default value of bool in c#?

0 Answers  






Is stringbuilder thread safe c#?

0 Answers  


write the Syntax for Function or Method Overriding?

5 Answers   HCL,


What is a dictionary in c#?

0 Answers  


What is a thread c#?

0 Answers  


What is string class in c#?

0 Answers  


Are c# tuples immutable?

0 Answers  


How do we achieve encapsulation in c#?

0 Answers  


Categories