using System;
//csc array_jagged.cs
namespace array_jagged
{
class ArrayJagged
{
public static void process()
{
// Declare the stray of two elements:
string[][] str = new string[2][];
// Initialize the elements:
str[0] = new string[5] {"a", "b", "c", "d" , "e" };
str[1] = new string[4] {"ab", "bc", "cd", "de" };
// str[2] = new string[4] {"ab", "bc", "cd", "de" };
// Display the stray elements:
for (int i = 0; i < str.Length; i++)
{
//Console.Write("Element({1}): ", i);
for (int j = 0; j < str[i].Length; j++)
{
Console.Write("{0}{1}", str[i][j], j == (str[i].Length - 1) ? "" : " ");
}
Console.WriteLine();
}
}
}
class test
{
static void Main()
{
ArrayJagged.process();
Console.ReadLine();
}
}
}