The following example uses the Length property to get the total number of elements in an array.
msdn.microsoft.com