.net 基礎知識大雜燴(4) ——陣列
阿新 • • 發佈:2019-02-05
{ 4, 5, 6 } };
int[,] t1 = new int[,] { { 1, 2, 3 },
{ 4, 5, 6 } };
Console.WriteLine(t.Length); //=> 6
Console.WriteLine(t.Rank); //=> 2
Console.WriteLine(t.GetLength(0)); // => 2
Console.WriteLine(t.GetLowerBound(0)); // => 0
Console.WriteLine(t.GetUpperBound(0)); // => 1
Console.WriteLine(t.GetLowerBound(1)); // => 0
Console.WriteLine(t.GetUpperBound(1)); // => 2
Console.WriteLine(t.GetLength(1)); // => 3