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 ...

Get Programming Microsoft® Visual C#® 2008: The Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.