Visual Basic .NET Language Array

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Remarks

Dim myArray(2) As Integer

someFunc(myArray)

An array is an index-ordered collection of objects. The type of object is defined by the type given in the array declaration.

Arrays in Visual Basic .NET are most commonly (and by default) zero (0) based, meaning that the first index is 0. An array of 10 elements will have an index range of 0-9. When accessing array elements, the maximum accessible index is one less than the total number of elements. Because of this, loops that access array indices incrementally should always do a range check where the value is less than the array length.



Got any Visual Basic .NET Language Question?