static void Main(string[] args) { IShape shape1 = new DOTShape(ConsoleColor.Red); IShape clone = (IShape)shape1.Clone(); clone.Color = ConsoleColor.Green; shape1.Print(); clone.Print(); }
private DOTShape(DOTShape shape) { width = shape.width; height = shape.height; Color = shape.Color; }