The .NET Framework Type System

C++ programmers in particular will be surprised by the changes in the basic storage types used by the .NET framework. An integer is no longer just a couple of bytes in a memory block somewhere. Of course, the data is stored in memory, but you can now treat that integer like an object, accessing methods that it exposes.

There are two distinctly different families of types. Value types, including chars, ints, and doubles to name a few, are accompanied by reference types such as arrays, interfaces, classes, and a native string type.

Because the .NET framework itself defines the types, languages such as C#, Visual Basic, and others can use them in the same way. This means that the integer used by VB is the same as the ...

Get C# and the .NET Framework: The C++ Perspective 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.