CHAPTER 8 WORKING WITH INTERFACES
class Octagon : IDrawToForm, IDrawToMemory, IDrawToPrinter
{
public void Draw()
{
// Shared drawing logic.
Console.WriteLine("Drawing the Octagon...");
}
}
Although the code compiles cleanly, we do have a possible problem. Simply put, providing a single
implementation of the Draw() method does not allow us to take V