Udostępnij za pośrednictwem


Nullable types are not allowed in conditional compilation expressions

A nullable type cannot be used in the expression of a conditional compilation directive. For example, the following code causes this error.

'#Const triggerPoint = 0

'' Not valid.
'#If CType(triggerpoint, Boolean?) = True Then
'        ' Body of the conditional directive.
'#End If

Error ID: BC33111

To correct this error

  • Remove the nullable type designation.

See Also

Concepts

Nullable Value Types

Conditional Compilation Overview

Reference

#If...Then...#Else Directives