using System;
namespace Example12
{
public class Point
{
private double x, y;
public Point(double x, double y)
{
this.x = x;
this.y = y;
}
public double X
{
get { return x; }
set { x = value; }
}
public double Y
{
get { return y; }
set { y = value; }
}
}
///
/// Summary description for Class1.
///
class Class1
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
Point a = new Point(1.7, 2.3);
Point b = new Point(5.6, 4.2);
Console.WriteLine("a.x=" + a.X + " a.y=" + a.Y);
Console.WriteLine("b.y=" + b.Y + " b.x=" + b.X);
//b = new Point(9.3,4.2);
b.X = 9.3;
Console.WriteLine("b.y=" + b.Y + " b.x=" + b.X);
}
}
}