1. Trang chủ
  2. » Giáo án - Bài giảng

Chapter 1 Introduction to the Visual Studio 2010

42 433 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 42
Dung lượng 3,15 MB

Nội dung

1 Write source code c# and saved file with .cs extension 2 C# compiler=> Compile source code to an intermediate language MSIL 3 MSIL is contained in an assembly.exe or .dll extension

Trang 2

Introduction to the Visual Studio 2010

Trang 3

What you Learn in this chapter?

Visual Studio 2010

Trang 4

.Net Framework

[4.0] software development platform

Support several programming languages:

C# ,VB, C++,F#

Common Language Runtime (CLR)

Include NET Framework Class Library(FCL)

Trang 5

create application will run in the NET CLR

Why

C# ?

Evolution of the C & C++ languages

Incorporate the best features from other languages & Clearing up their problems

Syntax is simple Directly accessing & manipulating system memory

Trang 6

Windows Application

Trang 8

Operating system

CPU & other hardware

.NET libraries

Trang 9

1 Write source code c# and saved file with .cs extension

2 C# compiler=> Compile source code to an intermediate language (MSIL)

3 MSIL is contained in an assembly(.exe or .dll extension)

4 Can use source code or reference NET framework libraries

Trang 10

5 CLR runs on top of host operating system

6 CLR loads assembly & uses JIT compiler to translate MSIL to native machine code

7 Load NET libraries if need

8 MSIL code can execute on any CPUs if CPU is supported by CLR

Trang 11

Powerful, professional Integrated Development

Environment (IDE)

Integrated compiler, debugger,

Other useful tool…

Trang 13

Solutions and Projects group the items needed

to create a program or application:

 A Solution can contain one or more Project

 A Project represents a particular part of a

solution

 A Project contains source code file, settings &

resource for application

 A Project can contain Class Reference libraries

 Etc…

Trang 15

1 Solution

1 File/New/Project (or Ctrl+ Shift +N)

2 Choose “Visual Studio Solutions” in left panel

3 Enter Name & location solution => click OK

Trang 16

You can see “Solution1”

name in the right panel

Trang 17

1 Right click on Solution1

2 Choose Add item

3 Choose New Project

Trang 18

& click OK

Trang 19

Many different projects

in the Solution

Trang 20

Problem: You don’t

know which Project

that you want to run

1 Right click on Project

2 Choose Set as

StartUp Project

Trang 21

Problem: We have

many Window

Computing Platform…

To any PC can run

your Application, you

must config as below

Right click

on Project

& choose Properties

Trang 22

Or

Go to menu Project

=> Choose Project

properties

Trang 23

Project Properties dialog

Trang 24

How to add New Item in the Project

1.Right click on Project 2.Choose Add item

3.Choose New Item

Trang 25

Choose any item

Enter name and click

“Add” button

Trang 26

AssemblyInfo file Reference NET

libraries

Trang 27

Solution Folder content

Trang 28

Project Folder content

Trang 29

How to build Solution & Project

Build Solution Build Project Batch Build

Trang 30

You can check or uncheck

project to build

Build

Trang 32

1 Choose line you want

to start debugging

2 Go to Debug menu

3 Choose Toggle

Breakpoint or press F9

Trang 33

Breakpoint here

Trang 34

4 Go to Debug

5 Choose Start Debugging or press F5

Also you can clear all Breakpoints

Trang 35

You can see The Yellow Line

And the name + value of variables

Trang 36

Step Into Step Over Step Out

Trang 37

Use

QuickWatch

to see detail information of variable at

runtime

Trang 38

QuickWatch Dialog here

Variable’s infor

Trang 39

You can change value

of the variable and click

Reevaluate button

Trang 42

END

Ngày đăng: 13/05/2014, 11:36

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w