CHAPTER 6

image

Data Types

The game’s afoot.

—William Shakespeare, Henry V

In this chapter, we dig deeper into the CLI type system as well as the implementation of C++/CLI in Microsoft Visual C++ 2013. You should already have a firm base in C# classes, structures, and interfaces from your previous programming experience, and we want to build on that knowledge to expose differences between C# and C++/CLI.

C# Types versus C++ Types

The C# language was designed specifically to target the CLR. Therefore, all of its data types map directly to CLI types. C++/CLI not only defines data types for the CLI but also defines data types for use in native C++. ...

Get C++ 2013 for C# Developers,Second Edition 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.