I am working in Microsoft Visual C# 2008 on a Windows Form application.
I would like to write some variables out to a window in the IDE to determine what values they contain. I thought perhaps I could write to the console using console.writeline however I did not see where I could open a console window.
Is there a command I should be using to write to the immediate window or some other place where the information can easily be seen in the IDE?
Use Debug.WriteLine(). It's output goes to the Output window. Console.WriteLine() works the same way in a Winforms app but using Debug is better since that code automatically gets removed in the Release build.
And of course, you'll want to leverage the debugger first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With