O'Reilly logo

C# Web Development with ASP.NET: Visual QuickStart Guide by Jose Mojica

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

Interfaces are types that enable you to define multiple classes that have similar functionality. Let’s suppose you had a class named Escort. The Escort class has methods like Run, Stop, PlayMusic, etc. You’re happy with the Escort class because it enables you to come to and from work. At some point, however, your friends begin to make fun of your Escort class, and you would like to replace the Escort class with the Ferrari class. Before you replace the Escort class with the Ferrari class, you want to make sure that the Ferrari class at least has the same functionality as the Escort class. It should Run, Stop, and PlayMusic. It may do all those things differently than the Escort class, but the point is that it at least has ...

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