Sei sulla pagina 1di 5

C# Programming Visual Studio and .

NET Visual Studio 2010 Editions Express edition Professional Edition Premium Edition Ultimate Edition Programming Languages supported by Visual Studio Visual Basic Visual C# Visual C++ Visual F# Platforms that can run Visual Studio 2010 Windows XP Windows Vista Windows 7 Or any latest version Visual Studio includes the .NET framework and IDE The .NET framework consists of 2 main components: the .NET framework class and the common language runtime The .NET Framework

Introduction - 1

C# Programming The Visual Studio IDE

Introduction - 2 How C# differs from Java C# uses a syntax thats similar to Java. They only differ on the classes they use. How a C# application is compiled and run

How a C# application is compiled and run 1. Creating projects which is composed of files 2. When compiling, the C# source code is converted into a language that the PC understands How C# differs from other .NET languages C# uses the same .NET framework being used by the other languages from Visual Studio. C# also uses the same IDE as the other VS languages. They only differ in classes and syntax of the language.

Operation 1. The programmer uses VS to create a project which includes all source files. 2. C# translates is converted into assembly that is interpreted by its classes and stored in the memory 3. The application is run by the .NET framework .

C# Programming A tour of the Visual Studio IDE Starting Visual Studio Open start menu, locate the VS 2010 The start page opens including recent projects, new projects, and tutorials Opening and closing existing projects File>Open>Project Or File>Recent Projects Open Dialog Box

Introduction - 3 Project and solution concepts Every C# project has a project file Every solution has a solution file The solution is inside of project files The solution and project are inside the same directory How to open a project File>Open>Project/Solution File>Recent Projects You can also use the links on the Start Page How to close a project File>Close Form Designer Window

The main Visual Studio workspace contains one or more tabbed windows. To develop a form, you use the designer window. To develop code, use the code editor

C# Programming To add controls and other items to a form , use the toolbox. The toolbox contains a variety of items organized into categories To change the way a form or control looks or operates, you use the properties window. This windows displays the properties of the item that is selected in the form designer Use the solution explorer window to manage project files Several toolbars are available from VS. Other toolbars are also available in VS

Introduction - 4 Solution Explorer Used to manage projects that make up the solution and the files and are displayed in a tree view. Each file type on the solutions explorer is shown through file extensions.

Visual Studio Code Editor

The code editor is where you create and edit C# code. You can display the code editor by double clicking the form or controls in the design window You can switch from the code editor and design window and vice versa

C# Programming Visual Studio with two floating windows and a hidden window

Introduction - 5

How to test a project Build(compile) the project Run the project Displayed form

Potrebbero piacerti anche