From this post I can make an array of Dictionaries, using the below:
Dictionary<int, string>[] matrix = new Dictionary<int, string>[]
{
new Dictionary<int, string>(),
new Dictionary<int, string>(),
new Dictionary<int, string>()
};
But is there a way to make a variable length array without stating all the dictionaries, something like:
int amountOfDict = 4;
Dictionary<int, string>[] matrix = new Dictionary<int, string>[]
{
//for the amount of amountOfDict, make Dictionaries
};
I am happy to do this with a List, as I'm aware arrays have to be declared.