对变长数组使用foreach循环时,通常都要嵌套循环,才能得到该数据。
Example:

Code
static void Main(string[] args)
{
int[][] newArarry={new int[] {1},
new int[] {1,2},
new int[] {1,2,3},
new int[] {1,2,3,4},
new int[] {1,3},
new int[] {1,2,3,4,5},
new int[] {2,3,4},
new int[] {3,5}};
foreach(int[] newArarry1 in newArarry)
{
foreach(int newArarry2 in newArarry1)
{
Console.Write(newArarry2);
}
}
Console.ReadKey();