Chapter 1 - Introducing .NET and C#

.NET Framework是由微软开发的一个革命性平台,用于跨不同操作系统和编程语言创建各种类型的应用程序。它主要包括面向对象的代码库和通用语言运行时。通过.NET Framework可以开发Windows应用程序、Web应用程序和服务等。
  • Recap

1. What is .NET Framework?

The .NET Framework is a revolutionary platform created by Microsoft for developing various types of applications, over different operating systems (primarily Windows), and via different programming languages.


2. What does .NET Framework consist of?

2.1 OOP Code Library

2.1.1 Common Type System

Part of the code library defines some basic data types of the .NET Framework, known as the CTS, which facilitates interoperability between languages.

2.1.2 Other Modules

2.2 Common Language Runtime

CLR is the environment for maintaining the execution of all applications using the .NET library.


3. How to implement a .NET application?

3.1 Write code in a .NET-compatible language

3.2 Compile the code into the Common Intermediate Language

CIL is the .NET common language which is independent of hardware and operating systems.

3.3 Different parts of CIL are linked together to form an assembly

An assembly is a collection of CIL, metadata and other resources, so as to be enabled to be self-descriptive.

3.4 Compile the assembly into native code by the Just-In-Time compiler

JIT compilers have several versions for compiling the CIL into different native codes of different target architecture.

3.5 The native code is executed in the context of CLR

Such code is called managed code where memory management, security handling and debugging is looked after by CLR.


4. What are the most popular types of .NET applications?

4.1 Windows Applications

4.1.1 Windows Forms

The application has a traditional look and feel of Windows, made by using the Windows Forms module of the .NET Framework.

4.1.2 Windows Presentation Foundation

This is a revolutionary alternative to Windows Forms for producing more flexible and powerful applications.

4.2 Web Applications

4.2.1 ASP.NET

The powerful system leverages Web Form module and generates web content to the client dynamically, with personalization, security and much more enabled.

4.2.2 Silverlight

The application is written for running on the client side (inside the browser).

4.3 Web Services

The Web Service enables exchanging data over the web independent of the development language. Windows Communication Foundation can be adopted for more advanced capabilities.


5. What is C#?

C# is one of the languages that are compatible with .NET Framework, derived from C++ and designed specifically for .NET Framework.



  • Quiz

1. What are the possible benefits from the CTS in .NET Framework?

hint: language operability

2. What is the main impulse of introducing CIL instead of producing native code only?

hint: system independent

3. Given the metadata in an assembly, in what way does it make life easier?

hint: self description

4. Explain in details when C# is simpler and, on the contrary, when it can be more verbose than C++?

hint: syntax and type-safe

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值