What will be the best way to implement this method:
Type GetNullableTypeFromType(Type tp);
so that
Type tpString = GetNullableTypeFromType(typeof(string)); // Returns typeof(string)
Type tpInt = GetNullableTypeFromType(typeof(int)); // Returns typeof(int?)
1 Answer