HelloWorld program can compile but no output shown on console

tech_girl's Avatar, Join Date: Jun 2010
Light Poster
Hi all,

I'm a C# beginner. Managed to download and set up the environment for C# programming. I have downloaded and installed the .Net Framework 2.0 and its corresponding SDK.

I compiled a HelloWorld program. No error was shown on the console so I believe it has compiled successfully but it doesn't show "Hello World".


C:\MyProgram>csc HelloWorld.cs
Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.


C:\MyProgram>


Can anyone shed light on this? Is this a setup issue?
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Share your code
tech_girl's Avatar, Join Date: Jun 2010
Light Poster
Here is the code:

using System;
public class HelloWorld
{
public static void Main() {
Console.Write("Hello World!");
}
}
tech_girl's Avatar, Join Date: Jun 2010
Light Poster
Here is the code:

using System;
public class HelloWorld
{
public static void Main() {
Console.Write("Hello World!");
}
}
tech_girl's Avatar, Join Date: Jun 2010
Light Poster
Oops...apologies for the double post.
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
And why are you trying to run the program using console. Do you have the Editor?
tech_girl's Avatar, Join Date: Jun 2010
Light Poster
Issue resolved.

Yesterday I installed VS2005.