Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

windows form .. console.writeline() where is console?

I created a windows form solution and in the constructor of a class I called

Console.WriteLine("constructer called")

But I only got the form and not the console.. so where is the output?

like image 631
SmartestVEGA Avatar asked Apr 18 '11 17:04

SmartestVEGA


People also ask

Where can I find console WriteLine?

In Visual Studio uppermost menu choose Debug > Windows > Output. It shows all Console. WriteLine("Debug MyVariable: " + MyVariable) when you get to them.

What is console in console WriteLine?

Console is a predefined class of System namespace. While Write() and WriteLine() both are the Console Class methods. The only difference between the Write() and WriteLine() is that Console. Write is used to print data without printing the new line, while Console.

How do I use console WriteLine in Windows?

In project settings set application type as Console. Then you will get console window and Windows form. Show activity on this post. If you run your application in Visual Studio you can see the console output in the output window.


1 Answers

You should also consider using Debug.WriteLine, that's probably what you're looking for. These statements are written out the trace listeners for your application, and can be viewed in the Output Window of Visual Studio.

Debug.WriteLine("constructor fired"); 
like image 135
BrandonZeider Avatar answered Sep 27 '22 20:09

BrandonZeider