HelloWorld program can compile but no output shown on console

Light Poster
6Jun2010,10:36   #1
tech_girl's Avatar
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?
Go4Expert Founder
6Jun2010,13:05   #2
shabbir's Avatar
Share your code
Light Poster
6Jun2010,16:25   #3
tech_girl's Avatar
Here is the code:

using System;
public class HelloWorld
{
public static void Main() {
Console.Write("Hello World!");
}
}
Light Poster
6Jun2010,16:27   #4
tech_girl's Avatar
Here is the code:

using System;
public class HelloWorld
{
public static void Main() {
Console.Write("Hello World!");
}
}
Light Poster
6Jun2010,16:27   #5
tech_girl's Avatar
Oops...apologies for the double post.
Go4Expert Founder
6Jun2010,18:33   #6
shabbir's Avatar
And why are you trying to run the program using console. Do you have the Editor?
Light Poster
9Jun2010,12:01   #7
tech_girl's Avatar
Issue resolved.

Yesterday I installed VS2005.