Where does "Console.WriteLine" output go?

C

Curious

I''ve created a simple Console Application in C#.NET (.NET 2.0), and I
have the following code:

Console.WriteLine("Now let us begin!");

However, the string, "Now let us begin!", never shows up in the "View"-
"Output" window when I execute the code.

FYI, the text in the "View"->"Output" window is below instead:

'IO.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL
\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading
symbols. Module is optimized and the debugger option 'Just My Code' is
enabled.
The thread 0x16b0 has exited with code 0 (0x0).
The thread 0x1304 has exited with code 0 (0x0).
'IO.vshost.exe' (Managed): Loaded 'C:\Trading\IO\IO\bin\Debug\IO.exe',
Symbols loaded.
The thread 0x1180 has exited with code 0 (0x0).
The thread 0xb0c has exited with code 0 (0x0).
The program '[2768] IO.vshost.exe: Managed' has exited with code 0
(0x0).

Anyone can advise me on how to get the text show in the output? Thanks!
 
P

PvdG42

Curious said:
I''ve created a simple Console Application in C#.NET (.NET 2.0), and I
have the following code:

Console.WriteLine("Now let us begin!");

However, the string, "Now let us begin!", never shows up in the "View"-
"Output" window when I execute the code.

FYI, the text in the "View"->"Output" window is below instead:

'IO.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL
\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading
symbols. Module is optimized and the debugger option 'Just My Code' is
enabled.
The thread 0x16b0 has exited with code 0 (0x0).
The thread 0x1304 has exited with code 0 (0x0).
'IO.vshost.exe' (Managed): Loaded 'C:\Trading\IO\IO\bin\Debug\IO.exe',
Symbols loaded.
The thread 0x1180 has exited with code 0 (0x0).
The thread 0xb0c has exited with code 0 (0x0).
The program '[2768] IO.vshost.exe: Managed' has exited with code 0
(0x0).

Anyone can advise me on how to get the text show in the output? Thanks!

The output does not appear in the command prompt window opened by the
console application? That's where you should see it. If the command window
is disappearing immediately, run your app using "Start Without Debugging"
from the Debug menu. It won't show in the IDE Output window.
 
C

Curious

The output does not appear in the command prompt window opened by the
console application?  That's where you should see it. If the command window
is disappearing immediately, run your app using "Start Without Debugging"
from the Debug menu. It won't show in the IDE Output window.- Hide quotedtext -
Thanks for the advice!

It does show in a separate black Command window. I was looking for the
output at the wrong place in Visual Studio.
 
C

Cor Ligthert[MVP]

Curious,

Use

Console.ReadLine();

At the end.

Cor

Curious said:
I''ve created a simple Console Application in C#.NET (.NET 2.0), and I
have the following code:

Console.WriteLine("Now let us begin!");

However, the string, "Now let us begin!", never shows up in the "View"-
"Output" window when I execute the code.

FYI, the text in the "View"->"Output" window is below instead:

'IO.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL
\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading
symbols. Module is optimized and the debugger option 'Just My Code' is
enabled.
The thread 0x16b0 has exited with code 0 (0x0).
The thread 0x1304 has exited with code 0 (0x0).
'IO.vshost.exe' (Managed): Loaded 'C:\Trading\IO\IO\bin\Debug\IO.exe',
Symbols loaded.
The thread 0x1180 has exited with code 0 (0x0).
The thread 0xb0c has exited with code 0 (0x0).
The program '[2768] IO.vshost.exe: Managed' has exited with code 0
(0x0).

Anyone can advise me on how to get the text show in the output? Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top