Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Microsoft C# Professional Projects - Premier Press.pdf
Скачиваний:
177
Добавлен:
24.05.2014
Размер:
14.65 Mб
Скачать

16

Part I

INTRODUCTION TO C#

 

 

 

In C#, events are special types of delegates that are assigned to trap an event. Any activity performed by a system is known as an event. For example, when you press a key or move the mouse pointer, an event is generated. To create an event-driven application, you need to trap the events generated by the system and perform the necessary action. For example, you need to trap the action following a key press or a click of a mouse. To do this, C# provides you with the Event delegate.

Summary

In this chapter, you were introduced to the .NET Framework.The .NET Framework is a new API provided by Microsoft to help programmers develop applications for the distributed environment. In addition, .NET enables you to write applications for the Windows platform. Next, you learned about some of the components of the .NET Framework that make it a user-friendly development environment. These components include the CLR and the .NET class library.

The CLR is the run-time environment for the code written in .NET languages. The CLR includes CLS and CTS, which help you to achieve interoperability of the applications created for the .NET Framework. CTS is a set of guidelines and standard data types that you can use to create user-defined classes and objects for the .NET Framework. CLS is defined as a set of rules that a .NET language should follow to create applications that are interoperable with other languages.

In this chapter, you also learned about a class library. Visual Studio .NET is a development environment that provides you with several base classes containing methods. These base classes are contained in a library of classes called the .NET base class library, which is an API. Finally, you learned about some of the base classes in the class library, such as Exception, Thread, and Delegate.

Chapter 2

C# Basics