public static bool IsNullable(Type t) { ChecarSe.ArgumentoNaoNulo(t, nameof(t)); if (t.IsValueType) { return(IsNullableType(t)); } return(true); }
public static bool IsNullableType(Type t) { ChecarSe.ArgumentoNaoNulo(t, nameof(t)); return(t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Nullable <>)); }