Answer Posted / kirti
Yes. The Debug and Trace classes both have a Listeners property, which is a collection of sinks that receive the tracing that you send via Debug.WriteLine and Trace.WriteLine respectively. By default the Listeners collection contains a single sink, which is an
instance of the DefaultTraceListener class. This sends output to the Win32 OutputDebugString() function and also the System.Diagnostics.Debugger.Log() method. This is useful when debugging, but if you're trying to trace a problem at a customer site, redirecting the output to a file is more appropriate. Fortunately, the TextWriterTraceListener class is provided for this purpose.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
In razor syntax, what is the escape sequence character for @ symbol?
Explain the 'page lifecycle' of an ASP.NET MVC?
Explain something about model, view and controllers in asp.net mvc?
What are the versions of .net framework?
What is the difference between old ADO.NET and Entity framework coding techniques?
What are the two ways to add constraints to a route?
explain how you can load related entities in ef (entity framework)?
Can you explain model, controller and view in mvc?
Does Tempdata hold the data for other request in ASP.Net MVC?
what is ssdl?
Explain tempdata in mvc?
Why to use '{resource}.axd/{*pathInfo}' in routing in ASP.Net MVC?
How we can register the Area in ASP.Net MVC?
What is the advantage of using asp.net routing?
How we can invoke child actions in ASP.Net MVC?