I am using reflection to get the values out of an anonymous type:
object value = property.GetValue(item, null);
when the underlying value is a nullable type (T?), how can I get the underlying type when the value is null?
Given
int? i = null;
type = FunctionX(i);
type == typeof(int); // true
Looking for FunctionX(). Hope this makes sense. Thanks.