static void Main()
    {
        Rectangle rectangle = new Rectangle();
        Circle    circle    = new Circle();
        Drawing   drawing   = new Drawing();

        drawing.Add(rectangle);
        drawing.Add(circle);

        for (int i = 0; i < drawing.Count; ++i)
        {
            GeometricShape shape = drawing[i];
            shape.Draw();
        }
    }
Exemplo n.º 2
0
 private static void DrawShape(GeometricShape shape)
 {
     shape.Draw();
 }