These are fixed dimension arrays though, not a “jagged” array where each “row” contains a varying number of “column” elements.
So this form may be exactly what you wanted/needed, but it is (strictly speaking) serving a different goal.
C# always offers a few variations of the same declaration though, as its grown in syntactic sugars over the years, yet retains pretty much all of the original syntaxes too.
Another example on the jagged front with some slight alterations, given I don’t have to declare the types or quantity of dimensions up front:
var multiDimStrings = new[] {
new[] {"Oh", "the", "grand", "old", "Duke", "of", "York"},
new[] {"he", "had", "ten", "thousand", "men"},
new[] {"he", "marched", "them", "up", "to", "the", "top", "of", "the", "hill"},
new[] {"and", "now", "I'm", "tired", "of", "writing", "this", "all", "out"}
};
foreach(var line in multiDimStrings) {
foreach(var word in line) {
Console.Write(word + " ");
}
Console.WriteLine();
}
Console.WriteLine(multiDimStrings.GetType());
Console.WriteLine(multiDimStrings[1][3]);
Result:
Oh the grand old Duke of York
he had ten thousand men
he marched them up to the top of the hill
and now I'm tired of writing this all out
System.String[][]
thousand
Try it: https://dotnetfiddle.net/cycZVD