예제 #1
0
        static void Main(string[] args)
        {
            //Point point = new Point(10, 20);

            //Point point2 = point;

            //point2.x = 56;

            //Console.WriteLine($"x = {point.x} y = {point.y}");
            //Console.WriteLine($"x = {point2.x} y = {point2.y}");


            Point p = new Point("Some point", 10, 20);
            Point p2;

            p2 = p;

            Point p3 = new Point("P#3", -5, 11);


            //p2.SetX(50);

            DemoPoint(p2);

            Console.WriteLine($"x = {p.GetX()} y = {p.GetY()}");
            Console.WriteLine($"x = {p2.GetX()} y = {p2.GetY()}");

            Console.WriteLine($"Counter = {Point.counter}");


            //обращение к статическим данным класса Point
            Point res = Point.Sum(p2, p3);


            Console.Read();
        }