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

What is the use of display modes?

0 Answers  


What is inline schema, how does it works

1 Answers  


What is the use .glimpse in mvc?

0 Answers  


Can you explain renderbody and renderpage in mvc?

0 Answers  


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

0 Answers   Microsoft,






What are the 2 ways of adding constraints to a route?

0 Answers  


what is namespace?

9 Answers   TCS,


How do I define my own code group

1 Answers  


Can I add mvc testcases in visual studio express?

0 Answers  


What are Validation Annotations?

0 Answers  


What is strong name?

5 Answers  


What is object service? : Entity framework

0 Answers  


Categories