You can use Nullable.GetUnderlyingType
:
var t = typeof(T);
// ...
if (Nullable.GetUnderlyingType(t) != null)
{
// T is a Nullable<>
}
You can use Nullable.GetUnderlyingType
:
var t = typeof(T);
// ...
if (Nullable.GetUnderlyingType(t) != null)
{
// T is a Nullable<>
}