Types

This chapter is an introduction of Microsoft Visual C# 2008, including LINQ, which is the most important new feature in C#. The remaining chapters of this book provide the underlying details of LINQ and other topics introduced in this chapter, beginning with the next chapter, which pertains to types.

The core ingredient of most programming languages is the type. The term type encompasses classes, structures, interfaces, and enumerations. Classes are reference types and are placed on the managed heap, structures are value types and appear on the stack, and an enumeration is a set of flags.

Even a nontrivial C# program has at least one type. Literarily, except for namespaces, every entity in C# is a type or a member of a type. This includes the common primitives, such as int, float, and double. Classes are the nouns of the C# language, and it is certainly difficult to write a great story without any nouns. It is impossible to write a C# program without classes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.133.61