Shape に新しいコンストラクタを追加する必要があります。
struct Shape
{
public Shape(int width, int height, int xAxis, int yAxis)
{
this.width = width;
this.height = height;
this.xAxis = xAxis;
this.yAxis = yAxis;
}
private int width;
private int height;
private int xAxis;
private int yAxis;
public int Width { get { return width; } }
public int Height { get { return height; } }
public int XAxis { get { return xAxis; } }
public int YAxis { get { return yAxis; } }
}
次に、それを使用して作成できます。
Shape[] shapes = new Shape[]{
new Shape(1, 2, 3, 4),
new Shape(2, 4, 6, 8),
new Shape(1, 2, 3, 4),
new Shape(4, 3, 2, 1)
};