You are on page 1of 37

C#

C#

1
2
3
4
5

C#


6
7

1.1
1.2
1.3
1.4
1.5

.NET

C#
C#
C#

1.6 C#
1.7 C#
1.8

1.1 .NET
.net?

Microsoft.NET

Internet
.NET
.NET.NET(NET
Framework )

Microsoft. NET Framework

VC++.Net

C#

VB.Net

VJ#

.Net Framework (FCL)


(CLR)

1.1.1
CLR(Common Language Runtime).NET

CLR
.NET
.NET
MSIL(Microsoft Intermediate Language)
JIT(Just-In-Time)MSIL

CLR.NET

.NET

JIT

MSIL

1.1.2
FCL(Framework Class Libraries).NET

FCL

.NET

1.1.2 (
.NET


Windows/Web
XML Web Service
/

1.2
.NETMSIL

.NET
.NET

.NET

MSIL

1.2

Glosal Assembly Cache,GAC


1.3 C#


Web

1.4 C#

1.4 C#

1.5 C#
.NET Framework SDK
http://msdn.microsoft.com


Microsoft .NET Framework
2.0 (x86)
dotnetfx.exe

Microsoft .NET Framework


2.0 (SDK) (x64)
setup.exe

SDK

Visual Studio.NET
Visual Studio
ASP.NET Web XML Web services
Visual BasicVisual C#
Visual C++ (IDE)

.NET Framework
ASP Web XML Web services

Microsoft Visual Studio 2010

1.6 C#
//1-1
//HelloWorld.cs
using System;
class HelloWorld
{
static void Main()
{
Console.WriteLine("Hello World!");
}
}

Visual Studio

\Tools

Visual Studio

vcvarsall.bat
vcvarsall.bat

HelloWorld.cs C#
.cs
HelloWorld.cs
HelloWorld.cs
HelloWorld.exe

csc HelloWorld.cs

HelloWorld

1.6 C#()
1-1

csc HelloWorld.cs


HelloWorld

1.6 C#()

Visual Studio .NET


Microsoft Visual Studio 2010

Microsoft Visual
Studio 2010 Microsoft Visual Studio
2010

2 Visual Studio

Visual Studio

Visual C#
Windows




Program.cs
Program.cs

Program.cs
Ctrl+F5

1.6 C#()



Visual c#

1.6 C#()
Visual Studio
Main

Ctrl+F5

Visual Studio .NET

Web

Windows

Visual Studio .NET

XML Web
Service

Visual Studio

.cs
.sln
.aspx

Visual C#

Visual Studio

Web Web

.suo

.csproj

Visual C#

1.7 C#
///**/
using

using System.Text;

using Project = PC.MyCompany.Project;


C#C#
1

1.7 C#

C#

//P1_1.cs
using System;
namespace P1_1
{
class Program
{
static void Main()
{
Console.WriteLine("Welcome to .NET");
}
}
}

C#

using System;
namespace P1_1
{
class Program
{
static void Main()
{
Console.WriteLine("Welcome to .NET");
}
}
}

C#

using System;
namespace P1_1
{
class Program
{
static void Main()
{
Console.WriteLine("Welcome to .NET");
}
}
}

1.8
1.NET
A Java BC# CVC.NET D VB.NET
2C#
A B C D CLR
3 C#
AMain
B
CMain
DMainMain