static void Main(string[] args)
        {
            IShape shape1 = new DOTShape(ConsoleColor.Red);
            IShape clone  = (IShape)shape1.Clone();

            clone.Color = ConsoleColor.Green;
            shape1.Print();
            clone.Print();
        }
Exemple #2
0
 private DOTShape(DOTShape shape)
 {
     width  = shape.width;
     height = shape.height;
     Color  = shape.Color;
 }