|
Chapter 2. Introduction to C#IN BRIEF In this chapter, you will be introduced to various aspects of the .NET Framework, including data types, the Common Language Runtime, and garbage collection. The goal of this chapter is to give you a basic understanding of the .NET Framework, how it works, and how C# is an integral part of that framework. You don't have to have any previous exposure to C# to read this book. Some background and experience with programming in general would be helpful, but is also not necessary. WHAT YOU NEED
INTRODUCTION TO C# AT A GLANCE
Welcome to the .NET Framework. One of the main goals of the .NET Framework is to provide a universal, safe type system through which any language can communicate with managed code written in any other language. By defining a common set of data types, such as int, char, string, and the like, it also provides the ability for an object written in one language to be used and accessed in another language. As a result of the .NET Framework effort, C# was developed to harness the power of the platform. In addition, C# represents an evolution in language design. C# features many object-oriented features, such as properties for data encapsulation, polymorphic behavior, inheritance, and interface implementation. In addition, C# allows for a developer to tap into unsafe code (discussed later) when performance is at a premium. C# was developed to provide the best aspects of C++, Java, SmallTalk, and Modula2. Elements from each of the languages can be seen in C# and in the Common Language Runtime itself. |
|