Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What is the difference between Debug.Write and Trace.Write? When should each be used?
What is the difference between Debug.Write and Trace.Write? When should each be used?
✍: Guest
Answer1:
The Debug.Write call won’t be compiled when the DEBUG symbol is not defined (when doing a release build). Trace.Write calls will be compiled. Debug.Write is for information you want only in debug builds, Trace.Write is for when you want it in release build as well. And in any case, you should use something like log4net because that is both faster and better
Answer2:
Debug.Write & Trace.write - both works in Debug mode, while in Release Mode,Trace.write only will work .Try changing the Active Config property of Solution in Property page nd find the difference.
Debug.write is used while debuging a project and Trace.write is used in Released verion of Applications.
2014-02-24, 1909👍, 0💬
Popular Posts:
How do we get the current culture of the environment in windows and ASP.NET? “CultureInfo.CurrentCul. ..
How could Java classes direct program messages to the system console, but error messages, say to a f...
Can Java object be locked down for exclusive use by a given thread? Yes. You can lock an object by p...
How can I enable session tracking for JSP pages if the browser has disabled cookies? We know that se...
Give me the example of SRS and FRS SRS :- Software Requirement Specification BRS :- Basic Requiremen...