Nullable modifier cannot be used with a variable whose implicit type is 'Object'

A variable declaration includes the nullable type modifier (?), but does not specify a type or infer a type by assigning a value to the declared variable.

Error ID: BC33112

To correct this error

  • Specify a type when declaring the nullable variable. The type cannot be Object.

  • Assign a value when declaring the nullable variable. The type of the nullable variable will be inferred from the assigned value. The type of the value cannot be Object.

See Also

Concepts

Nullable Value Types