1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

HelloWorld program can compile but no output shown on console

Discussion in 'C#' started by tech_girl, Jun 6, 2010.

  1. tech_girl

    tech_girl New Member

    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?
     
  2. shabbir

    shabbir Administrator Staff Member

    Share your code
     
  3. tech_girl

    tech_girl New Member

    Here is the code:

    using System;
    public class HelloWorld
    {
    public static void Main() {
    Console.Write("Hello World!");
    }
    }
     
  4. tech_girl

    tech_girl New Member

    Here is the code:

    using System;
    public class HelloWorld
    {
    public static void Main() {
    Console.Write("Hello World!");
    }
    }
     
  5. tech_girl

    tech_girl New Member

    Oops...apologies for the double post.
     
  6. shabbir

    shabbir Administrator Staff Member

    And why are you trying to run the program using console. Do you have the Editor?
     
  7. tech_girl

    tech_girl New Member

    Issue resolved.

    Yesterday I installed VS2005.
     

Share This Page