Share via


IFieldSymbol.NullableAnnotation Property

Definition

Gets the top-level nullability of this field.

public Microsoft.CodeAnalysis.NullableAnnotation NullableAnnotation { get; }
member this.NullableAnnotation : Microsoft.CodeAnalysis.NullableAnnotation
Public ReadOnly Property NullableAnnotation As NullableAnnotation

Property Value

Remarks

The inferred nullability of a backing field symbol (for example, the symbol for a field keyword) is not exposed by this API. In that case, this API returns the nullable annotation of the associated property. The inferred nullability is only exposed indirectly via APIs that give information about expressions, such as Microsoft.CodeAnalysis.SemanticModel.GetTypeInfo(Microsoft.CodeAnalysis.SyntaxNode,System.Threading.CancellationToken) when called with a field expression.

Applies to