static void Main(string[] args)
{
int[,] arr = new int[3, 3] { { 1, 1, 1 }, { 2, 2, 2 }, { 3, 3, 3 } };
Console.WriteLine("行数:" + arr.Rank);
Console.WriteLine("列数:" + (arr.GetUpperBound(arr.Rank - 1) + 1));
Console.ReadKey();
}
时间: 2024-10-08 19:07:12