using System; using System.Collections.Generic; using System.Text;
namespace Example08 { public class Point { private double x, y; public Point(double X, double Y) { x = X; y = Y; } //重写ToString方法方便输出 public override string ToString() { return String.Format("X: {0} , Y: {1}", x, y); } } public class Points { Point[] points; public Points(Point[] Points) { points = Points; } public int PointNumber { get { return points.Length; } } //实现索引访问器 public Point this[int Index] { get