- Back to Home »
- C# Tutorial »
- Getting Started with C# .NET
Posted by : senan
Friday, February 14, 2014
What we're going to do first is to create a very simple programme, so that you can see what makes up a C# .NET project. By the end of this chapter, you'll have learnt the following:
- How to create new projects
- What the Solution Explorer is
- The various files that make up of a C# .NET project
- How to save your work
- How to run programmes
- The importance of the Main statement
Open the Visual C# Express software from your programs menu. When you first open C# (pronounced C Sharp), you should see a screen something like this, if you have the 2010 version of Visual C# Express:
If you have Visual Studio Express 2012/13, your opening screen will
look like this:
When you're looking at this piece of software for the first time, it can seem
hugely complex and daunting. The temptation is to think you're never going to
get to grips with something so difficult. But don't worry - after a few lessons
things will start to feel familiar, and you won't feel nearly half as intimidated
as you do now!A Simple C# Console Application
A Console Application is one that looks like a DOS window. If you don't know what these are, click your Start menu in the bottom left of your screen. Click on Run. From the dialogue box that appears, type cmd:Click OK and you'll see a black screen, like this one:
So with Visual C# Express open, click File from the menu bar at the top. From the File menu, select New Project (or click the New Project link on the left of the opening screen in versions 2010 and 2012/13):
When you click OK, a new Console Application project will be created for you. Some code should be displayed:
The code itself will look very complicated, if you're new to programming. We'll get to it shortly. For now, right click the Program.cs tab at the top, and click Close from the menu that appears:
Now click the plus symbol (arrow symbol in version 2012/13) next to Properties in the Solution Explorer above. You'll see the following:
But right click the AssemblyInfo.cs tab at the top, and click Close from the menu. Now, in the Solution Explorer, click the plus symbol next to References:
Before we add some code, let's save the project. We'll do that in the next part below.