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