Maha

Maha

  • NA
  • 0
  • 308.5k

NP66 GetLength(0) and Length

Dec 1 2007 6:31 AM

Hi Guys

 

NP66   GetLength(0) and Length

 

GetLength(0) and Length producing same results. I wish to know whether

These are same or different. Anyone knows please explain.

 

Thank you

 

using System;

 

class MainClass

{

    static void Main()

    {

        int[] arr = new int[] { 15, 20, 5, 25, 10 };

 

        Console.WriteLine("GetLength(0) = {0}", arr.GetLength(0));

        Console.WriteLine("Length = {0}", arr.Length);

    }

}

/*

GetLength(0) = 5

Length = 5

*/


Answers (2)