CHAPTER 2A Quick Tour of the C++/CLILanguage Features

The aim of this chapter is to give you a general idea of what C++/CLI is all about by providing a brief look at most of the new language features in the context of an extended example, saving the details for later chapters. By the end of this chapter, you'll have a good idea of the scope of the most important changes and will be able to start writing some code.

Primitive Types

The CLI contains a definition of a new type system called the common type system (CTS). It is the task of a .NET language to map its own type system to the CTS. Table 2-1 shows the mapping for C++/CLI.

Table 2-1. Primitive Types and the Common Type System

CLI TYPE C++/CLI Keyword Declaration Description

Get Foundations of C++/CLI: The Visual C++ Language for .NET 3.5 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.