Create a Simple C# Console Application

The simple programme we will create is called a Console Application. First open the Visual Studio 2010 software from your  programs menu.


Create a Simple C# Console Application


So with Visual Studio 2010 open , click File from the menu bar at the top , and from the file menu click New and select Project (or click the New Project link on the left of the opening screen or ShortcutKeys Ctrl+Shit+N).


Create a Simple C# Console Application


When you click Project or Ctrl + Shift + N , you will see the dialogue box:



Create a Simple C# Console Application

Select Console Application and sets the application Name and Location where do you want to save.
And the first programme called “Hello World” and it`s here:

   using System; 
   namespace ConsoleApplication1
   {
       class Program
       { 
            static void Main(string[] args)
            {
                Console.WriteLine(" Hello World ");
                Console.ReadLine();
             }

       }
  }

















The source code for a C# program is typically stored in one or more text files with a file extension of .cs, as in hello.cs. To test your program click Build menu at the top of Visual Studio 2010 , click Build Solution.When you click build solution you can build your programme when you click Debug  from the menu at the top  of Visual Studio 2010 and from the Debug Menu , select Start Debugging you can execute your programme. And now your programe are executed you can see here:


Create a Simple C# Console Application








No comments:

Post a Comment