C Sharp (C#) - Classes and Objects
What will be the output of this code?
class Point {
public int x, y;
public Point() { x = 0; y = 0; }
public Point(int a) { x = a; y = a; }
public Point(int a, int b) { x = a; y = b; }
}
var pt = new Point(5);
Console.WriteLine(pt.x + ","+ pt.y);