Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
what is the difference between and when should you be using console.writeline or debug.writeline?
Posted

Console writes to the console! So it is used for standard output from a console application.

Debug ( and Trace ) write to all "trace listeners", which include VS if you're debugging but also others such as DbgView[^].

Nick
 
Share this answer
 
Console.WriteLine is used when you need to display the message to the user. If you need to check the values only while debugging, use Debug.WriteLine.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900