Where does "Console.WriteLine" output go?

  • Thread starter Thread starter Curious
  • Start date Start date
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!
 
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.
 
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.
 
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!
 
Back
Top