Is there built-in support for tracing/logging



Is there built-in support for tracing/logging..

Answer / kirti

Yes, in the System.Diagnostics namespace. There are two main classes that deal with tracing - Debug and Trace. They both work in a similar way - the difference is that tracing from the Debug class only works in builds that have the DEBUG symbol defined, whereas tracing from the Trace class only works in builds that have the TRACE symbol defined. Typically this means that you should use System.Diagnostics.Trace.WriteLine for tracing that you want to work in debug and release builds, and System.Diagnostics.Debug.WriteLine for tracing that you want to work only in debug builds.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net Framework Interview Questions

WHICH IS MORE SECURED AMONG JAVA AND .NET?

7 Answers  


explain how you can load related entities in ef (entity framework)?

0 Answers   Microsoft,


What is meant by domain model?

0 Answers  


Why should we go for entity framework?

0 Answers  


Changes to which portion of version number indicates an incompatible change

1 Answers  


What's the difference between Java and .NET garbage collectors ?

1 Answers   BirlaSoft,


In which circumstances you used delegates?

5 Answers   HP,


Is any files are generated,when we are adding the web reference to the web service?

2 Answers  


And if they have conflicting method names ?

1 Answers  


I have interview in accenture.I cleared 1st round in techniqual.I have interview with project lead.pls help me.

2 Answers   Accenture,


What is entity sql? : Entity framework

0 Answers  


What is the .net framework?

0 Answers  


Categories