.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> C# >> Post New Question Subscribe to Interview Questions

What is the difference between Debug.Write and Trace.Write?

Posted By :Srikanth     Posted Date :April 22, 2011    Points :40   Category :C# 
The Debug.Write will work while the application is in both Debug Mode and Release Mode. This is normally used while you are going to debug a project. This will not be work when you will define some debug points to your project.

But the Trace.write will work while the application is only in Release Mode. This is used in released version of an application. This will compiled when you will define debug points in your project.

You can also find related Interview Question to What is the difference between Debug.Write and Trace.Write?  below: 

What's the difference between the Debug class and Trace class?

  
Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds. (More...)

What's the difference between Response.Write() andResponse.Output.Write()?

  
Response.Output.Write() allows you to write formatted output but Response.Write doesnt allow.

Example:Response.Output.Write("{0:d}", "Current Date Time: ", DateTime.Now) (More...)

What's the difference between the Debug and Trace?

  
Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds. (More...)

What's the difference between the Debug class and Trace class? Documentation looks the same.

  
Use Debug class for debug builds, use Trace class for both debug and release builds. (More...)

What's the difference between the Debug class and Trace class?

  
Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds. (More...)

Difference between Trace and Debug

  
difference between Trace and Debug


Trace and Debug 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.

· Use System.Diagnostics.Trace.WriteLine for tracing that you want to work in debug and release builds

· Use System.Diagnostics.Debug.WriteLine for tracing that you want to work only in debug builds.


(More...)

Difference between Trace and Debug

  

Trace and Debug 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.

· Use System.Diagnostics.Trace.WriteLine for tracing that you want to work in debug and release builds

· Use System.Diagnostics.Debug.WriteLine for tracing that you want to work only in debug builds.



(More...)

Difference between Trace and Debug?

  
Trace: Will work with Release Mode
Debug: Will work with Debug and Release Mode (More...)

difference between Response.Output.Write() and Response.Write?

  
Response.Output.Write() is used to display formatted output while

Response.Write() can only display single character line. (More...)

What is the difference between the Debug class and Trace class?

  
Use Debug class for debug builds, use Trace class for both debug and release builds. (More...)

Difference between Debug class and Trace class?

  
It looks same. We can use Debug class for debug builds snd Trace class for both debug and release builds.
(More...)

What's the difference between Response.Write() andResponse.Output.Write()?

  
Response.Output.Write() allows you to write formatted output. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend