Exemple #1
0
        private static void Example2()
        {
            Console.WriteLine("=> Example2");

            AnotherPoint goldPoint = new AnotherPoint(PointColor.Gold)
            {
                X = 90, Y = 20
            };

            goldPoint.DisplayStats();

            Console.WriteLine();
        }
        private static void SimpleStructUsingExample()
        {
            Console.WriteLine("=> SimpleStructUsingExample");

            Point myPoint1;

            myPoint1.X = 349;
            myPoint1.Y = 76;
            myPoint1.Display();
            myPoint1.Increment();
            myPoint1.Display();

            Point myPoint2 = new Point();

            myPoint2.Display();

            AnotherPoint anotherPoint = new AnotherPoint(50, 60);

            anotherPoint.Display();

            Console.WriteLine();
        }