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 |
Can you please explain the request flow in ASP.NET MVC framework?
Features in .net framework 1.1 ?
When using aspx view engine, to have a consistent look and feel, across all pages of the application, we can make use of asp.net master pages. What is asp.net master pages equivalent, when using razor views?
Where does web.config info stored? Will this be stored in the registry ?
1 Answers Accenture, BirlaSoft,
What's different about namespace declaration when comparing that to package declaration in Java ?
What are Action Filters in ASP.NET MVC and its use?
What are the 2 popular asp.net mvc view engines?
Which version of .net framework is installed?
Can you explain model, controller and view in mvc?
What is the difference between the value-type variables and reference-type variables in terms of garbage collection ?
What are Non Action methods in ASP.Net MVC?
Is CLR is compiler or Interpreter