Wednesday, 11 February 2015

C# - 'Hello World' Console Application program.

Click link for Visual C# installation procedure 

Launch Visual C# IDE.

Select 'New Project'.

Select 'Console Application' and click on 'OK' button.

Type 'Cons' and click keyboard 'Contrl' + 'Space' (Cntrl+Space) to see the available classes.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
    public class Program
        static void Main(string[] args)
            Console.WriteLine("Hello World");

Executing the Program:

Output is displayed in console after executing the program.

Additional Information:
ConsoleApplication1.exe is generated.

Double click on 'ConsoleApplication1.exe' to execute exe file.
Executing .exe file doesn't require Visual C# IDE to be launched.

No comments:

Post a Comment