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
Why do we need indexer in c#?
What is the difference between system.string and system.text.stringbuilder classes?
Write the syntax for catching an exception in c#?
What are c# attributes and its significance?
What are the differences between value types and reference types?
What is an assembly loader?
What is monitor in C#?
What is a nested type. Give an example?
How do you create partial methods?
Which of these statements correctly declares a two-dimensional array in c#?
What are the types of parameters in c#?
What are the different states of a thread?
What is the difference between first and firstordefault?
What do you mean by thread safe in c#?
Are attributes inherited c#?