Thursday, July 23, 2015

ARRAY CLASS

Properties of the Array Class The following table describes some of the most commonly used properties of the Array class:
1 IsFixedSize
       Gets a value indicating whether the Array has a fixed size.
2 IsReadOnly
          Gets a value indicating whether the Array is read-only.
3 Length
        Gets a 32-bit integer that represents the total number of elements in all the dimensions of the Array.
4 LongLength
     Gets a 64-bit integer that represents the total number of elements in all the dimensions of the Array.
5 Rank
    Gets the rank (number of dimensions) of the Array.
Methods of the Array Class
1.       Clear
Sets a range of elements in the Array to zero, to false, or to null, depending on the element type.
2.Copy
(Array, Array, Int32) Copies a range of elements from an Array starting at the first element and pastes them into another Array starting at the first element. The length is specified as a 32-bit integer.
3.GetLength
Gets a 32-bit integer that represents the number of elements in the specified dimension of the Array.
4.GetLongLength
 Gets a 64-bit integer that represents the number of elements in the specified dimension of the Array.
5.GetLower
Bound Gets the lower bound of the specified dimension in the Array.
6. Reverse(Array)
 Reverses the sequence of the elements in the entire one-dimensional Array.
7.Sort(Array)

Sorts the elements in an entire one-dimensional Array using the IComparable implementation of each element of the Array.

No comments:

Post a Comment