Exemplo n.º 1
0
 public void PrintShape(IShape shape)
 {
     Console.WriteLine($"A {shape.Color} {shape.Name} with an area of {shape.GetArea()}");
 }
Exemplo n.º 2
0
 static void ShowArea(IShape shape)
 {
     Console.WriteLine(shape.GetArea());
 }