Difference between Debug.Write and Trace.Write - C#.Net

What is the difference between Debug.Write and Trace.Write? When should each be used?

Debug.WriteTrace.Write
It uses the Debug class.It uses the Trace class.
It uses the time of application development.It uses the time of application deployment.
It works only in debug mode.It works in both case debug and release mode.
It is used while debugging a project.It is used in releasing version of applications.
It runs in the same thread as main program executes.It runs in different thread form main program execute thread.
It is used to find errors in the program.It is used for testing and optimization even after an application is compiled and released.
If 'DEBUG' is defined during the compilation, Debug.Write will be emitted.If 'TRACE' is defined during the compilation, Trace.Write will be emitted.
Use of virtual, sealed, override, and abstract - C#.NET
Explain the use of virtual, sealed, override, and abstract - The virtual keyword enables a class to be overridden. If it has to be prevented from being overridden...
What benefit do you get from using a Primary Interop Assembly (PIA? - C#.NET
What benefit do you get from using a Primary Interop Assembly (PIA)? - A primary interop assembly contains type definitions (as metadata) of types implemented with COM...
Use of static members with example using C#.NET.
Explain the use of static members with example using C#.NET - Static members are not associated with a particular instance of any class.
Post your comment