Checking if Type instance is a nullable enum in C#

Posted by adrin on Stack Overflow See other posts from Stack Overflow or by adrin
Published on 2010-04-27T16:33:07Z Indexed on 2010/04/27 16:53 UTC
Read the original article Hit count: 305

Filed under:
|
|

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.IsNullableEnum(); How to implement this extension method?

© Stack Overflow or respective owner

Related posts about c#

Related posts about enums