Delen via


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

Name Value Description
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.
NotApplicable 0

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

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.

NotAnnotated 1

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

Annotated 2

The expression is annotated (does have a ?).

Applies to