wip
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public static class TypeExtensions
|
||||
{
|
||||
public static Type MakeNullable(this Type type) =>
|
||||
type.IsValueType && Nullable.GetUnderlyingType(type) == null
|
||||
? typeof(Nullable<>).MakeGenericType(type)
|
||||
: type;
|
||||
}
|
||||
Reference in New Issue
Block a user