
Public Shared Sub Clear (array As Array, index As Integer, length As Integer) The following table provides some of the most commonly used methods of the Array class − Sr.No Gets the rank (number of dimensions) of the Array. Gets a 64-bit integer that represents the total number of elements in all the dimensions of the Array. Gets a 32-bit integer that represents the total number of elements in all the dimensions of the Array. Gets a value indicating whether the Array is read-only. Gets a value indicating whether the Array has a fixed size. The following table provides some of the most commonly used properties of the Array class − Sr.No

The Array class provides various properties and methods to work with arrays. The Array class is the base class for all the arrays in VB.Net.
#Vb net 2010 how do i get a list of my control instances code
When the above code is compiled and executed, it produces the following result − For example,ĭim intData() As Integer = ", i, j, a(i)(j)) You can also initialize the array elements while declaring the array. For example,ĭim intData(30) ' an array of 31 elementsĭim strData(20) As String ' an array of 21 stringsĭim twoDarray(10, 20) As Integer 'a two dimensional array of integersĭim ranges(10, 100) 'a two dimensional array To declare an array in VB.Net, you use the Dim statement. The lowest address corresponds to the first element and the highest address to the last element.


An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.Īll arrays consist of contiguous memory locations. An array stores a fixed-size sequential collection of elements of the same type.
