예제 #1
0
        static void Main(string[] args)
        {
            Circle figure       = new Circle(30, 50, 60);
            Circle clonedFigure = figure.DeepCopy() as Circle;

            figure.Point.X = 100;
            figure.GetInfo();
            clonedFigure.GetInfo();

            Console.Read();
        }
예제 #2
0
        public void Run()
        {
            Circle figure = new Circle(30, 50, 60);

            // применяем глубокое копирование
            Circle clonedFigure = figure.DeepCopy() as Circle;

            figure.Point.X = 100;
            figure.GetInfo();
            clonedFigure.GetInfo();

            Console.Read();
        }