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
public static IType ToNonNullableType(this IType type)
Parameters
Type |
Name |
Description |
IType |
type |
|
Returns
Returns the non-nullable type from the current ITypeParameter. If the current type is a non-nullable reference type, returns the current type.
Declaration
public static ITypeParameter ToNonNullableType(this ITypeParameter type)
Parameters
Returns
Returns the non-nullable type from the current IArrayType. If the current type is non-nullable, returns the current type.
Declaration
public static IArrayType ToNonNullableType(this IArrayType type)
Parameters
Returns
Returns the non-nullable type from the current IDynamicType. If the current type is non-nullable, returns the current type.
Declaration
public static IDynamicType ToNonNullableType(this IDynamicType type)
Parameters
Returns
Returns the non-nullable type from the current INamedType. If the current type is a non-nullable reference type, returns the current type.
If current type represents a Nullable<T> where T
is a value-type type parameter, this method returns ITypeParameter.
Otherwise, it returns an INamedType.
Declaration
public static IType ToNonNullableType(this INamedType type)
Parameters
Returns