Nullable modifier '?' and array modifiers, '(' and ')', cannot be specified on both a variable and its type

The nullable type modifier (?) is included on the variable in a variable declaration in which the array modifiers (parentheses) are included on the specified variable type. Or, the nullable type modifier is included on the specified variable type in a variable declaration in which the array modifiers are included on the variable.

Error ID: BC33102

To correct this error

  • Specify both the nullable type modifier (?) and the array modifiers (parentheses) on either the declared variable or the specified variable type, as shown in the following example.

    ' These are incorrect.
    ' Dim numbers? As Integer()
    ' Dim values() As Integer?
    
    'These are correct.
    Dim numbers?() As Integer
    Dim values As Integer?()
    

See Also

Concepts

Nullable Value Types