CHAPTER 9Interfaces

Interfaces may contain method declarations (including properties and events), static methods, and static fields, but no instance method definitions and no instance data members. As you already know, interfaces partially take the place of multiple inheritance in C++/CLI. However, the words "inherit from" are not used; rather, the word used is "implements," since the class that implements an interface must provide the method bodies for all the instance methods declared in the interface, even if it is an abstract class.

Note Although the CLI itself does allow an abstract class implementing an interface to leave unimplemented methods, this is not allowed in C++/CLI.

You're probably used to using pointers or references to base ...

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.