In order to check if a Type
( propertyType
) is nullable, I’m using:
bool isNullable = "Nullable`1".Equals(propertyType.Name)
Is there some way that avoid using magic strings ?
In order to check if a Type
( propertyType
) is nullable, I’m using:
bool isNullable = "Nullable`1".Equals(propertyType.Name)
Is there some way that avoid using magic strings ?