Jagged array in c#
string[][] jaggedArray = new string[][]
{
new string[] { "one1", "two1", "three1", "four1", "five1", "six1" },
new string[] { "one2", "two2", "three2", "four2", "five2", "six2" },
new string[] { "one3", "two3", "three3", "four3", "five3", "six3" },
new string[] { "one4", "two4", "three4", "four4", "five4", "six4" },
new string[] { "one5", "two5", "three5", "four5", "five5", "six5" },
new string[] { "one6", "two6", "three6", "four6", "five6", "six6" },
new string[] { "one7", "two7", "three7", "four7", "five7", "six7" },
new string[] { "one8", "two8", "three8", "four8", "five8", "six8" }
};
foreach (string[] array in jaggedArray)
{
foreach (string value in array)
{
Console.WriteLine(value);
}
Console.WriteLine();
}
Comments
Post a Comment