What is tracing?Where it used.Explain few methods available
Answer / kirti
Tracing refers to collecting information about the application while it is running. You use tracing information to troubleshoot an application.
Tracing allows us to observe and correct programming errors. Tracing enables you to record information in various log files about the errors that might occur at run time. You can analyze these log files to find the cause of the errors.
In .NET we have objects called Trace Listeners. A listener is an object that receives the trace output and outputs it somewhere; that somewhere could be a window in your development environment, a file on your hard drive, a Windows Event log, a SQL Server or Oracle database, or any other customized data store.
The System.Diagnostics namespace provides the interfaces, classes, enumerations and structures that are used for tracing The System.Diagnostics namespace provides two classes named Trace and Debug that are used for writing errors and application execution information in logs.
All Trace Listeners have the following functions. Functionality of these functions is same except that the target media for the tracing output is determined by the Trace Listener.
Method Name
Result Fail Outputs the specified text with the Call Stack.
Write Outputs the specified text.
WriteLine Outputs the specified text and a carriage return.
Flush Flushes the output buffer to the target media.
Close Closes the output stream in order to not receive the tracing/debugging output.
Is This Answer Correct ? | 0 Yes | 0 No |
Is .net framework backwards compatible?
how many ways for pass the parameters in the fuction in c#
In .net compact framework, can we free memory explicitly without waiting for garbage collector to free the memory?
What is Area in ASP.Net MVC?
Can we have more than 1 partial classes in the same file?
explain lazy loading, eager loading, and explicit loading?
What is Differnce between html.action and ajax.action?
Define the core components of an ASP.NET MVC application?
What is Layout in ASP.Net MVC?
What is the difference between model view and controller?
how to face first interview in .NET?
Where does web.config info stored? Will this be stored in the registry ?
1 Answers Accenture, BirlaSoft,