Interview answers verified by specialists.
Find interview questions and answers on this website:
• The system.Diagnostics namespace contains the Debug and Trace classes for Tracing. • The difference between Trace and Debug class is that when we use Debug class for tracing, it will work in builds which have the debug symbol defined. While when we use Trace class for tracing, it will work in builds which have the Trace symbol defined. • System.Diagnostics.Trace.WriteLine namespace is used to trace when we want to work in debug and release builds, and System.Diagnostics.Debug.WriteLine namespace is used to trace when we want to work only in debug builds. • Tracing is the process of gathering information related to the program's execution whereas Debugging is the process of searching & solving errors in the program.