using System;
namespace Example40
{
class Point
{
private double x;
private double y;
public Point(double x, double y)
{
this.x = x;
this.y = y;
}
public override string ToString()
{
return "(" + x + "," + y + ")";
}
}
///
/// Summary description for Class1.
///
class Class1
{
public static void printPts(Point[] p)
{
for (int i = 0; i < p.Length; i++)
{
Console.WriteLine("pts[" + i + "]= " + p[i].ToString());
}
}
///
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
Point[] pts = new Point[10];
for (int i = 0; i < pts.Length; i++)
{
pts[i] = new Point(i, i+1);
}
printPts(pts);
}
}
}