This post will assists you in running your first C#.net 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
Steps
Follow the below given steps:
- 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 |
-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");
Console.WriteLine("amtdw.blogspot.com");
// for reading the above content
Console.ReadLine();
}
}
}
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
Figure 6: Console Application Output
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