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
What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly?
What is native image generator (ngen.exe)?
What is the signature of a method?
Are all methods virtual in c#?
Explain About CLS?
Is array reference type in c#?
Is string a class in c#?
What is the difference between integer and double?
What is the use of base keyword? Tell me a practical example for base keyword’s usage?
What is the relationship between a process, application domain, and application?
What does out mean c#?
What is predicate builder?
What is private virtual in C#?
What is the real use of interface in c#?
How to force my .net app to run as administrator on windows 7?