Generic Argument of Nullable Type
For future reference, sample code on how to get the generic argument of a nullable type in C#:
Type type = typeof(int?); bool isNullable = type.IsGenericType && (type.GetGenericTypeDefinition() == typeof(Nullable<>)); Type genArg = type.GetGenericArguments()[0];
Posted by
Charles Cook
at 08:54 AM.
Permalink.
blog comments powered by Disqus.
Copyright © Charles Cook.