using System; public class Point { private int x; private int y; public Point() { x = 0; y = 0; } public Point(int x, int y) { this.x = x; this.y = y; } public void SetX(int x) { this.x = x; } public int GetX() { return x; } public void SetY(int y) { this.y = y; } public int GetY() { return y; } public override string ToString() { return $"({x}, {y})"; } } public class Program { public static void Main() { Point p1 = new Point(10, 2); Point p2 = new Point(20, 2); Point temp = p1; p1 = p2; p2 = temp; Console.WriteLine($"p1 = {p1}, p2 = {p2}"); } }