Exemple #1
0
        private static void FunWithRectangles () {
            var r = new Rectangle {
                TopLeft = new Point {X = 1, Y = 2, Z = 3},
                BotRight = new Point {X = 4, Y = 5, Z = 6},
                Height = 15,
                Width = 17
            };
            Console.WriteLine ("\nRectangle r:\n{0}\n", r.ToString ());

            var rClone = (Rectangle) r.Clone ();
            Console.WriteLine ("\nRectangle rClone:\n{0}\n", rClone.ToString ());
        }
Exemple #2
0
        private static void FunWithRectangles()
        {
            var r = new Rectangle {
                TopLeft = new Point {
                    X = 1, Y = 2, Z = 3
                },
                BotRight = new Point {
                    X = 4, Y = 5, Z = 6
                },
                Height = 15,
                Width  = 17
            };

            Console.WriteLine("\nRectangle r:\n{0}\n", r.ToString());

            var rClone = (Rectangle)r.Clone();

            Console.WriteLine("\nRectangle rClone:\n{0}\n", rClone.ToString());
        }