Sunday, 1 July 2012

Run your first Console Application

This post will assists you in running your first Console Application. Before proceeding further I would like to list the framework/tools which will be used.

Software/Tools used

  •      .NET Framework4.0
  •      Microsoft Visual Studio2010                                            

Follow the below given steps:

  1. To open a new project in Microsoft Visual Studio 2010, go to file and select new. Now click on project. Figure 1: Open new project     -
open new project

2.   To open Console Application under Visual C #
                -Go to left panel-> Recent Tempaltes-> VisualC#->Windows
                -Click on Windows
                -Now, select Console Application on the right

      Figure 2: Open Console Application -
New Console Application

3. Enter name of New Project: amtdwCMDconsole
    Figure 3:Enter project name and press enter. -
Project: amtdwCMDconsole
4.  After pressing OK, you can see that below .cs file will get open:
     Figure 4: Program.cs file generated -
Program.cs file

5.   Code Snippet 1: Program.cs

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

    namespace amtdwCMDconsole
     class Program
      static void Main(string[] args)
      Console.WriteLine("This is related to C# console application");
      // for reading the above content

6.  Now, run the project. Press F5 or click on the red button.
     Figure 5: Start Debugging -
Start Debugging (F5)

7.  Now, the output is displayed below:
     Figure 6: Console Application Output -

Please comment and forward to others if you like this.
Other posts with video tutorial yet to come.....
"I am sure that blogs really help people around the world.
Let us follow this simple thinking of sharing knowledge . . ."

No comments:

Post a Comment