Sunday, December 14, 2014

1021-Creating A Simple C# Console Application


---
1021-Creating A Simple C# Console Application
1) Run Visual Studio 2012
2) Create New Console Project
3) Edit Codes
4) Debug Codes

1) Run Visual Studio 2012

If you don’t get Visual C# Environment, follow this tutorial, http://visualstudio-steps.blogspot.com/2014/12/1020-visual-studio-2012-setting-c.html 

2) Create New Console Project

2.1) Go to Menu. Select File/New/Project…
2.2) Define project settings
Visual C#,
Windows,
.NET 4.5,
Console Application,
ConsoleApplication1
Click OK.
2.3) Outcome.

3) Edit Codes

3.1) Codes are shown in Code Editor window.
3.2) Edit as follows
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            // Output text to the screen.
            Console.WriteLine("Beginning Visual C# 2012!");
            Console.ReadKey();
        }
    }
}

4) Debug Codes

4.1) Go to Menu. Select Debug/Start Debugging.
4.2) Outcome.
Note:
If you select “Start without debugging”, you will not get the Locals and Call Stack window.
---

No comments:

Post a Comment