예제 #1
0
        static void Main()
        {
            Console.WriteLine("Hello from struct");
            point myPoint;

            myPoint.X = 349;
            myPoint.Y = 76;
            myPoint.display();

            myPoint.increment();
            myPoint.display();

            point p1 = new point();

            p1.display();

            point p2 = new point(50, 60);

            p2.display();

            point p3          = new point(7, 5);
            var   PointValues = p3.Deconstruct();

            Console.WriteLine("x is {0}", PointValues.Xpos);
            Console.WriteLine("y is {0}", PointValues.Ypos);
        }