src/AppMotor.Core/Extensions/TypeExtensions.cs
/// <summary>
/// Returns whether this type can be <c>null</c>. Returns <c>true</c> for
/// all reference types and for all nullable value types.
/// </summary>
/// <seealso cref="IsNullableValueType"/>
Returns whether this type can be nulltrue
Returns whether this type can be nulltrue
[PublicAPI, Pure]
    [Obsolete("Nullable and non-nullable reference types (available since C# 8) can't be differentiated this way. " +
              "As such this method may return 'true' even for non-nullable reference type. " +
              "Because of this, it's no longer advisable to use this method.")]
    public static bool IsNullableType(this Type type)
    {
        Validate.ArgumentWithName(nameof(type)).IsNotNull(type);
        return !type.IsValueType || type.IsNullableValueType();
    }
[ PublicAPI , Pure ] [ Obsolete ( " " + " " + " " ) ] public static bool IsNullableType ( this Type type ) { Validate . ArgumentWithName ( nameof ( type ) ) . IsNotNull ( type ) ; return ! type . IsValueType || type . IsNullableValueType ( ) ; }
Returns whether this type can be nulltrue
Returns whether this type can be nulltrue
Type
this
seealso
None