NullableAnnotation Enum

Definition

Represents the nullability of values that can be assigned to an expression used as an lvalue.

public enum NullableAnnotation
type NullableAnnotation = 
Public Enum NullableAnnotation
Inheritance
NullableAnnotation

Fields

Annotated 2

The expression is annotated (does have a ?).

Disabled 1

The expression comes from a library not updated to C# 8 or nullable was disabled for the definition, and has no nullability information. Analysis is disabled.

None 0

The expression has not been analyzed, or the syntax is not an expression (such as a statement).

There are a few different reasons the expression could have not been analyzed:

  1. The symbol producing the expression comes from a method that has not been annotated, such as invoking a C# 7.3 or earlier method, or a method in this compilation that is in a disabled context.
  2. Nullable is completely disabled in this compilation.
NotAnnotated 1

The expression is not annotated (does not have a ?).

NotApplicable 0

The expression has not been analyzed, or the syntax is not an expression (such as a statement).

Applies to