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

How could we achieve Langauge Interoperability through "CLS"?? Please Expalin in detail with Example.. Thanks for the Help!!!!!

2 Answers   HCL,


what is way of loading data in ef (entity framework)?

0 Answers   Microsoft,


What are the benefits of .net framework?

0 Answers  


What is RouteConfig.cs in ASP.Net MVC 4?

0 Answers  


What is meant by bootstrap in mvc5?

0 Answers  






Features in .net framework 1.1 ?

1 Answers   Digital GlobalSoft,


How we can handle the exception at controller level in ASP.Net MVC?

0 Answers  


What is the mvc pattern (model view controller pattern)?

0 Answers  


What is shadowing?

6 Answers   IBM,


What are Action Filters in ASP.NET MVC and its use?

0 Answers  


What meant of assembly & global assembly cache (gac) & Meta data

1 Answers  


What’s the advantage of using System.Text.StringBuilder over System.String?

4 Answers   IBM,


Categories