GetLength() method does not work as expected on an array
===

Here is a C# code.

It outputs the following text :
tab.Length = 6
tab.Rank = 2
Length of dim 0 of tab : 0
Length of dim 1 of tab : 1

I expected the following text :
tab.Length = 6
tab.Rank = 2
Length of dim 0 of tab : 2
Length of dim 1 of tab : 3

Why not ? Thanks.


    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    
    namespace TableTest
    {
        class Program
        {
            static void Main(string[] args)
            {
                int[,] tab = new int[2, 3];
    
                for (int i = 0; i < 2; i++)
                {
                    for (int j = 0; j < 3; j++)
                    {
                        tab[i, j] = 2 * i + j;
                    }
                }
                Console.WriteLine("tab.Length = {0}", tab.Length);
                Console.WriteLine("tab.Rank = {0}", tab.Rank);
                for (int i = 0; i < tab.Rank; i++)
                {
                    Console.WriteLine("Length of dim {0} of tab : {0} ", i, tab.GetLength(i));
                }
                
            }
        }
    }

