Share via


Visual Basic Concepts

Remove Array Bounds Checks

Turns off error checking for valid array indexes and the correct number of dimensions of the array.

By default Visual Basic makes a check on every access to an array to determine if the index is within the range of the array. If the index is outside the bounds of the array, an error is returned. Selecting this option will turn off this error checking, which can speed up array manipulation significantly. However, if your program accesses an array with an index that is out of bounds, invalid memory locations may be accessed without warning. This can cause unexpected behavior or program crashes.