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 partialview in asp.net mvc?

0 Answers  


what do you mean by table-per-type?

0 Answers   Microsoft,


What is domain class model?

0 Answers  


How is method overriding different from method overloading

1 Answers   Siebel Systems,


What is Peek method in Tempdata in ASP.Net MVC?

0 Answers  






What are the components required to create a route in mvc?

0 Answers  


If u have an Empty Xml file and u have to bind dataset data to empty xml file? if u have an empty dataset u have to bind xml file data to it?

0 Answers  


What is entitytype? : Entity framework

0 Answers  


Define the core components of an ASP.NET MVC application?

0 Answers  


How the ‘page lifecycle’ of ASP.Net MVC does works?

0 Answers  


Where The Inheritence is useful?How we decide the situation of inheritence

2 Answers  


What is objectcontext? : Entity framework

0 Answers  


Categories