Multidimensional Array of Vector2

Could someone please explain how I can make a multidimensional array of Vector2 variables.

Currently I am trying to use a list as follows:

    private List<Vector2[, , , , , ,]> enemySpawnPositions = new List<Vector2[, , , , , ,]>();

But my question is, how do I populate the data?

I have tried the following:

    enemySpawnPositions.Add(new Vector2[new Vector2(0, 0),new Vector2(0, 0),new Vector2(0, 0),new Vector2(0, 0),new Vector2(0, 0),new Vector2(0, 0),new Vector2(0, 0)]);
    enemySpawnPositions.Add(new Vector2[]{new Vector2(0, 0),new Vector2(0, 0),new Vector2(0, 0),new Vector2(0, 0),new Vector2(0, 0),new Vector2(0, 0),new Vector2(0, 0)});
    enemySpawnPositions.Add(new Vector2[{ new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0) }]);
    enemySpawnPositions.Add(new Vector2[ Vector2(0, 0), Vector2(0, 0), Vector2(0, 0), Vector2(0, 0), Vector2(0, 0), Vector2(0, 0), Vector2(0, 0)]);
    enemySpawnPositions.Add(new Vector2[]{ Vector2(0, 0), Vector2(0, 0), Vector2(0, 0), Vector2(0, 0), Vector2(0, 0), Vector2(0, 0), Vector2(0, 0)});
    enemySpawnPositions.Add(new Vector2[{  Vector2(0, 0),  Vector2(0, 0),  Vector2(0, 0),  Vector2(0, 0),  Vector2(0, 0),  Vector2(0, 0),  Vector2(0, 0) }]);

…but all give me errors (which isn’t surprising). So could someone please explain how I populate multidimensional arrays/lists. The data is irrelevant right now, I just need to know how to do it.

In case you’re wondering I need a block of 7 (always 7) Vector2 co-ordinates but an unlimited quantity of them.

Thanks

Supposing you have a 2-dimensional array:

int[,] values = new int[10,10];

You could access it like so:

int x = 0;
int y = 0;
values[x,y] = 10;

With that said, though, your description at the bottom sounds more like this sort of structure:

class MyClass {
	public Vector2 a; //give these vars descriptive names
	public Vector2 b;
	public Vector2 c;
	public Vector2 d;
	public Vector2 e;
	public Vector2 f;
	public Vector2 g;
}

List<MyClass> myList = new List<MyClass>();

OK. I’ve managed to sort it.

I was making it more complicated than I should have been.

My solution is:

    private List<Vector2[]> enemySpawnPositions = new List<Vector2[]>();

And then to populate it, it’s:

    enemySpawnPositions.Add(new Vector2[7] { new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0) });

Or if you don’t care how many you have per group then it’s:

    enemySpawnPositions.Add(new Vector2[] { new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0) });

Note: the omission of 7 in the square brackets.

Thanks guys for pointing me in the right direction!