HighTechTalks DotNet Forums  

Console.Writeline does not print to the command prompt

Dotnet Data Tools microsoft.public.dotnet.datatools


Discuss Console.Writeline does not print to the command prompt in the Dotnet Data Tools forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
rich
 
Posts: n/a

Default 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??



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.