日期:2014-05-17  浏览次数:20917 次

请问一下!这个是什么
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace do_two_array
{
  class Program
  {
  static void Main(string[] args)
  {
  int [,] a, b;
  a = new int[3, 2] { { 1, 2 }, { 3, 4 }, { 5, 6 } };
  b = new int[,] { { 4, 6 }, { 8, 10 }, { 15, 20 }, };
  Console.WriteLine("a矩阵中的数据如下: ");
  for (int i = 0; i < 3; i++)
  {
  for (int j = 0; j < 2; j++)
  Console.WriteLine("{0}", a[i, j]);
  Console.WriteLine();
  }

  }
  }
}
上面代码的 i j代表的是什么, a[i,j]代表的是什么


------解决方案--------------------
表示下标和数组中指定下标对应的数。
------解决方案--------------------
二维数组的坐标 相当于 x . y 也可以蛮理解是两个字段的表
------解决方案--------------------
i 和 j就是for循环时候用来表示这是第几次循环的一个标记变量。a[i,j]根据当时i和j的值来显示数组中元素