How do i check if a Type is a nullable enum in C# something like
Type t = GetMyType(); bool isEnum = t.IsEnum; //Type member bool isNullableEnum = t.IsNullab
As from C# 6.0 the accepted answer can be refactored as
Nullable.GetUnderlyingType(t)?.IsEnum == true
The == true is needed to convert bool? to bool