Working with .NET Types

Now that you've seen the various mixed-mode programming issues to be aware of, let's look at the basics of working with .NET types. Specifically, this part covers how to define and use both reference and value types, the concepts of boxing and unboxing, using managed and unmanaged pointers, handling .NET arrays, and the proper destruction of .NET objects.

Defining and Using Managed Types

As you know by now, the Managed Extensions part of the Visual C++ .NET compiler allows you to write C++ applications that declare and use BCL types. To that extent, there are two distinct managed types that are supported by the Managed Extensions: reference types and value types. In order to interact with the .NET types from your MFC applications, ...

Get Extending MFC Applications with the .NET Framework 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.