StripNullabilityAnnotation()
Strips the nullability annotation from the current type, returning an unannotated version.
Declaration
IType StripNullabilityAnnotation()Returns
| Type | Description |
|---|---|
| IType | A type whose IsNullable property is null, meaning the type has no nullability annotation. If the current type is a Nullable<T>, returns the underlying value type. |
Remarks
Unlike ToNonNullable(), which marks reference types as non-nullable (returning a type with IsNullable set to false), this method returns an unannotated type (with IsNullable set to null).