using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections;
using System.Text;namespace t
{
class Param
{
static int Main()
{
int[][] jagged = new int[3][];
jagged[0] = new int[2] {1,2 };
jagged[1] = new int[6] { 3, 4, 5, 6, 7, 8 };
jagged[2] = new int[3] { 9, 10, 11 };
for (int row = 0; row < jagged.Length; row++)
{
for (int element = 0; element < jagged[row].Length; element++)
{
Console.WriteLine("row:{0},element:[1],value:{2}",row ,element ,<jagged [row].[element]);
}
}
}
}
}
我对着书看了几次应该是输对的,但是总是报错,代码最后一行也没看懂,是不是这里写错了
using System.Collections.Generic;
using System.Linq;
using System.Collections;
using System.Text;namespace t
{
class Param
{
static int Main()
{
int[][] jagged = new int[3][];
jagged[0] = new int[2] {1,2 };
jagged[1] = new int[6] { 3, 4, 5, 6, 7, 8 };
jagged[2] = new int[3] { 9, 10, 11 };
for (int row = 0; row < jagged.Length; row++)
{
for (int element = 0; element < jagged[row].Length; element++)
{
Console.WriteLine("row:{0},element:[1],value:{2}",row ,element ,<jagged [row].[element]);
}
}
}
}
}
我对着书看了几次应该是输对的,但是总是报错,代码最后一行也没看懂,是不是这里写错了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货