Saturday, August 21, 2010

How to display "Hello World" in Console Application

File Hello.cs

Using System; //uses the namespace system

class Hello //file name and class name need not be identical
       static void main() //entry point must be called Main
           Console.WriteLine("Hello World"); //Output goes to Console

Compile in the Console window(Command prompt)

Output( after Execution)
Hello World

No comments:

Post a Comment