using System; class Point{ Int32 x; Int32 y; public Int32 X{ get{return x;} set{x = value;} } public Int32 Y{ get{return y;} set{y = value;} } } class App{ public static void Main(){ Point p = new Point(); p.X = 10; p.Y = p.X+5; Console.WriteLine(p.Y); } } /* Other code used in figures in the tutorial class Point{ Int32 x; Int32 y; public Point():this(0, 0){} public Point(Int32 x, Int32 y){ this.x = x; this.y = y; } public Int32 X{ get{return x;} set{x = value;} } public Int32 Y{ get{return y;} set{y = value;} } } class NamedPoint:Point{ String name; public NamedPoint(String name):this(name, 0, 0){} public NamedPoint(String name, Int32 x, Int32 y):base(x, y){ this.name = name; } public String Name{ get{return name;} } } //*/