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 the difference between const and readonly in c#.net?
What is the base class from which all value types are derived?
What does executescalar return in c#?
What is the base class in .net from which all the classes are derived from?
How can you use abstract class and interface?
What is the .NET collection class that allows an element to be accessed using a unique key?
How we can create an array with non-default values?
What are verbatim strings in c#?
Explain synchronous and asynchronous operations?
How does dependency injection work c#?
What is the difference between func and action delegate?
Why would you use untrusted verification?
What is selector c#?
Is null c# operator?
What is a virtual property. Give an example?