Source
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication6
{
class Program
{
static void Main(string[] args)
{
int[][] jagged = new int[3][];
jagged[0] = new int[2];
jagged[0][0] = 1;
jagged[1] = new int[1];
jagged[2] = new int[3] { 3, 4, 5 };
for (int i = 0; i < jagged.Length; i++)
{
int[] innerArray = jagged[i];
for (int j = 0; j < innerArray.Length; j++)
{
Console.Write(innerArray[j]+"");
}
Console.WriteLine();
}
Console.ReadKey();
}
}
}
No comments:
Post a Comment