02 - Getting Started with C#

2.1 Development tools for C# programming

Microsoft provides the various development tools for C# programming. The list of the tools is as mentioned below:

Visual Studio 2010

Visual C# 2010 Express

Visual Web Developer

The Visual Studio tool is the collection of services that helps user for creating variety of applications. It is helpful for connecting all projects, teams. It is flexible and integrated and helps user to develop products effectively.

2.2 User Interface elements of Visual Studio in .NET

Whenever the user works with the project in Visual Studio .NET, there are elements available in the application. The elements are as mentioned below:

1) The Start Page

2) Solution Explorer window

3) Output Window

4) Class View Window

5) Code Editor Window

6) Error List Window

7) Standard ToolBar

1) The Start Page: When the user starts the Microsoft Visual Studio, the start page is displayed.

The following figure shows the start page of Visual Studio:

The start page is the default page for the browser provided with Visual Studio .NET. The tasks performed by it are specifying preferences, searching information about new features and communicating with developers on .NET platform.

When the user opens the Visual Studio application, the Projects tab is selected by default on the Start page. User can view any projects displayed on the screen.

2) Solution Explorer Window: The Solution Explorer window is used to list the solution name, the project name, and all the classes added in the project. User can open a particular file by double clicking the file in the Solution Explorer window.

The Solution Explorer Window is as shown below:

3) Output Window: The Output Window displays messages for the status of various features of Visual Studio .NET. When the application is compiled, the output window displays the current status. The number of errors occurred during the compilation are displayed.

The Class View window has two buttons, one for sorting the items and other for creating the new folder. The following figure shows the Class View window:

5) Code Editor Window: The Code Editor Window allows the user to enter and edit code. User can add code to the class using this editor. The following figure shows the Code Editor window for Visual Studio.

6) Error List Window: The Error List Window displays the list of errors along with the source of the error. It identifies the errors as you edit or compile the code. User can locate the source of the error by double clicking the error in the Error List Window. User can open the Error list window by clicking View -> Error List window.

The Error List window is as shown below:

7) Standard ToolBar: The standard toolbar is located below the menu bar. It provides the shortcut menus for the commands. The buttons include tasks such as open a new or existing file, saving or printing a file, cutting and pasting text, undoing and redoing the recent actions.

The following table lists the name and functions of the various tools of the Standard ToolBar.

Name

Button

Function

New Project

It creates a new project

Add New Item

It adds new item in the project

Save

It saves the program

Save All

It saves all the unsaved items of the application

Cut

It places the selected text or objects on the Windows Clipboard

Copy

It places a copy of selected text or objects on the Windows Clipboard

Paste

It pastes the contents of Clipboard on the document

Start Debugging

It compiles and executes the current project

2.3 Compiling and Executing the Project

To compile and execute the application, you need the perform the following steps: