It doesn’t seem to make sense, but it’s riding a array 4-dimensional, so you have to declare this way. I also made for two (the amount declared in the code), but the result presented seems to want 4 even, although I think at most 3 would solve, so I did for this amount too.
public class Program {
public static void Main() {
var players = new string[,,,] { { { { "Armando", "P" }, { "Dave", "S" } }, { { "Richard", "R" }, { "Michael", "S" } } }, { { { "Allen", "S" }, { "Omer", "P" } }, { { "David E.", "R" }, { "Richard X.", "P" } } } };
var players3 = new string[,,] { { { "Armando", "P" }, { "Dave", "S" } }, { { "Richard", "R" }, { "Michael", "S" } }, { { "Allen", "S" }, { "Omer", "P" } }, { { "David E.", "R" }, { "Richard X.", "P" } } };
var players2 = new string[,] { { "Armando", "P" }, { "Dave", "S" }, { "Richard", "R" }, { "Michael", "S" }, { "Allen", "S" }, { "Omer", "P" }, { "David E.", "R" }, { "Richard X.", "P" } };
}
}
Behold working in the ideone. And in the .NET Fiddle. Also put on the Github for future reference.
How many dimensions should the matrix have?
– Maniero
@Maniero put an example of what I would like to create
– Matheus