static void Main(string[] args)
{
int[] strA ={3,4};
int[] strB=new int []{1,11};
Array arr = Array.CreateInstance(Type.GetType("System.Int32"), strA, strB);
Random r = new Random();
for (int i = arr.GetLowerBound(0); i < arr.GetUpperBound(0); i++)
{
for (int j =arr.GetLowerBound(1) ; j <arr .GetUpperBound (1) ; j++)
{
arr.SetValue((int)r.Next()%100,i,j );
Console.WriteLine("arr[{0},{1}]={3}",i,j,arr.GetValue(i,j));
}
}
“Console.WriteLine("arr[{0},{1}]={3}",i,j,arr.GetValue(i,j));”为什么VS报错说有无效参数?? |