Explicit initialization is not permitted for arrays declared with explicit bounds

Arrays cannot be initialized if they are declared to be a specific size.

Error ID: BC30672

To correct this error

  • Declare the array, and then initialize it separately.

  • Declare and initialize as a dynamic array, and use ReDim if necessary; for example:

    Dim A() As Integer = {0, 1, 2, 3}
    ReDim Preserve A(3)
    

See Also

Other Resources

Arrays in Visual Basic