O'Reilly logo

C# Primer: A Practical Approach by Stanley B. Lippman

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 4. Interface Inheritance

An interface specifies a set of abstract methods and properties. Like an abstract base class, an interface is made concrete by each of its derived classes. Unlike an abstract base class, an interface cannot provide a default implementation or define state, such as an instance data member or constant.

An abstract base class provides a common interface for a family of related types. In computer graphics, for example, Light may serve as an abstract base class for a family of lights. Users are likely to manipulate the lights in a scene independently of the actual type—turning them on or off, repositioning them, changing their color and intensity, and so on. The delivery of a Light hierarchy includes the abstract 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