Console.Writeline does not print to the command prompt -
04-04-2006
, 07:00 AM
I was prototyping a .net remoting application for work. I wanted to print a
few things to the screen, then run a Console.Readline() to keep the window
open and run .net remoting calls against the server.
Sounds simple...but...
My development environment is giving me some very weird results.
below is the code for Server.cs
-----------------------------------------------
using System;
using System.IO;
namespace RemotingServer.Server
{
public class Server
{
[STAThread]
static void Main()
{
Console.WriteLine(" \n\nHello World " );
Console.WriteLine(" \n\nHello World " );
Console.WriteLine(" \n\nHello World " );
}
}
}
----------------------------------------------------------------------------
After a build through visual studio:
If I run
command>server.exe
nothing is printed to the screen.
If I run
command>server.exe > a.txt
from the command prompt the command prompt, the output of
Hello World
Hello World
Hello World
appears.
Now if I run a compile of
csc Server.cs on the file and run this Server.exe
On the command prompt I receive
Hello World
Hello World
Hello World
Can you help me with this predicament?? |