public float this[int i]
{
get
{
switch (i)
{
case 0:
return this.X;
case 1:
return this.Y;
default:
throw new IndexOutOfRangeException();
}
}
set
{
switch (i)
{
case 0:
this.X = value;
break;
case 1:
this.Y = value;
break;
default:
throw new IndexOutOfRangeException();
}
}
}