Programming References and tutorials for Developers.

A simple C# program displaying "Hello world" on screen

By The Saint on Tuesday, January 06, 2009

Filed Under:

A simple C# program displaying "Hello World" on screen

The following console program stated below will simply display a string hello world on screen.


using System; //using keyword
used to import a library


namespace SampleCode{ //namespace denotes the project name

class HelloWorld{ //HelloWorld the name of the class
static void Main(string [] args){ //invoking the Main method

Console.WriteLine("Hello World"); //method used to display
the string
Hello world
}

}

}



0 comments for this post