VB Methods of the Array


S.N Method Name & Description
1 Public Shared Sub Clear ( array As Array, index As Integer, length As Integer ) Sets a range of elements in the Array to zero, to false, or to null, depending on the element type.
2 Public Shared Sub Copy ( sourceArray As Array, destinationArray As Array, length As Integer ) 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 Public Sub CopyTo ( array As Array, index As Integer ) Copies all the elements of the current one-dimensional Array to the specified one-dimensional Array starting at the specified destination Array index. The index is specified as a 32-bit integer.
4 Public Function GetLength ( dimension As Integer ) As Integer Gets a 32-bit integer that represents the number of elements in the specified dimension of the Array.
5 Public Function GetLongLength ( dimension As Integer ) As Long Gets a 64-bit integer that represents the number of elements in the specified dimension of the Array.
6 Public Function GetLowerBound ( dimension As Integer ) As Integer Gets the lower bound of the specified dimension in the Array.
7 Public Function GetType As Type Gets the Type of the current instance (Inherited from Object).
8 Public Function GetUpperBound ( dimension As Integer ) As Integer Gets the upper bound of the specified dimension in the Array.
9 Public Function GetValue ( index As Integer ) As Object Gets the value at the specified position in the one-dimensional Array. The index is specified as a 32-bit integer.
10 Public Shared Function IndexOf ( array As Array, value As Object ) As Integer Searches for the specified object and returns the index of the first occurrence within the entire one-dimensional Array.
11 Public Shared Sub Reverse ( array As Array ) Reverses the sequence of the elements in the entire one-dimensional Array.
12 Public Sub SetValue ( value As Object, index As Integer ) Sets a value to the element at the specified position in the one-dimensional Array. The index is specified as a 32-bit integer.
13 Public Shared Sub Sort ( array As Array ) Sorts the elements in an entire one-dimensional Array using the IComparable implementation of each element of the Array.
14 Public Overridable Function ToString As String Returns a string that represents the current object (Inherited from Object).

Share this article on