Skip to content

Instantly share code, notes, and snippets.

@jonathascosta
Created May 20, 2011 19:53
Show Gist options
  • Save jonathascosta/983650 to your computer and use it in GitHub Desktop.
Save jonathascosta/983650 to your computer and use it in GitHub Desktop.
Type extension methods
public static class TypeExtensions
{
public static bool IsNullableOrType<T>(this Type type)
where T : struct
{
return (type == typeof(T) || type == typeof(T?));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment