using System; class TwoD { public int x{private get;set;} public int y{get;set;} public void show() { Console.WriteLine(""+x+" "+y); } } class MainClass { static void Main() { TwoD t1 = new TwoD(); t1.x = 1; t1.y = t1.x + 1; t1.show(); } }