O'Reilly logo

Foundations of C++/CLI: The Visual C++ Language for .NET 3.5 by Gordon Hogenson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required