using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

 

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            int[][] myArr = new int[2][];
            myArr[0] = new int[3] { 1, 2, 3 };    //需要说下这是锯齿数组才会有下面的  行.length 的属性,试了标准的多维数组没有这属性的。 声明也不一样是 int[,,] 类型。
            myArr[1] = new int[2] { 4, 5 };
            Console.WriteLine(myArr.Rank);
            for (int i = 0; i < myArr.Length; i++)
            {
                for (int j       = 0; j < myArr[i].Length; j++)
                {
                    Console.WriteLine("行数:{0,-5}列数:{1,-5}值为{2,3}",i,j,myArr[i][j]);

                }
               
            }
        }
    }
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-30
  • 2021-07-06
  • 2022-12-23
  • 2022-01-18
  • 2021-11-30
猜你喜欢
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2021-07-13
相关资源
相似解决方案