use of Implicitly typed jagged arrays
class Use
{
static public void Main()
{
// Creating and initializing
// implicitly typed jagged array
var jarray = new[] {
new[] { 785, 721, 344, 123 },
new[] { 234, 600 },
new[] { 34, 545, 808 },
new[] { 200, 220 }
};
Console.WriteLine("Data of jagged array is :");
// Display the data of array
for (int a = 0; a < jarray.Length; a++)
{
for (int b = 0; b < jarray[a].Length; b++)
Console.Write(jarray[a][b] + " ");
Console.WriteLine();
}
Console.ReadLine();
}
}
No comments