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