ToNonNullable()
Returns the non-nullable type from the current IType. If the current type is a non-nullable reference type, returns the current type. If the current type is a Nullable<T>, i.e. a nullable value type, returns the underlying type.
Declaration
IType ToNonNullable()
Returns
Type | Description |
---|---|
IType |
Remarks
Note that for non-value type type parameters, this method strips the nullable annotation, if any, which means it returns a type whose IsNullable property returns null. This is because C# has no way to express non-nullability for type parameters.