Una variable no se puede inicializar con un tipo "<elementname>" que no sea de matriz.

Una variable que se declara como una matriz se debe inicializar con un valor de matriz.

' Not valid.  
' The following line causes this error when executed with Option Strict off.  
' Dim arrayVar1() = 10  

Identificador de error: BC36536

Para corregir este error

  • Inicialice la variable de matriz con un valor de matriz:

    ' With Option Strict off.  
    Dim arrayVar2() = {1, 2, 3}  
    ' With Option Strict on.  
    Dim arrayVar3() As Integer = {1, 2, 3}