CHAPTER 8Inheritance

The inheritance model for C++/CLI classes is not the same as that in C++. Multiple inheritance (of managed class types) is not supported. Instead, C++/CLI reference types may only inherit from one base class, but may implement multiple interfaces. This is the only supported inheritance model in the CLI, so languages such as C# and VB .NET support the same model as C++/CLI. Other features of the model include the ability to specify whether a function with the same name as a base class's virtual function is intended to be an override to that function, or whether it is a new function with the same name.

The philosophy behind the simplified inheritance model is based on several perceived issues with multiple inheritance. One ...

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.