Skip to content

Commit 2bcdac4

Browse files
authored
Merge pull request #10 from j13leach/master
Handle Nullable types
2 parents c5bdab8 + c74148f commit 2bcdac4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

FileContextCore/Serializer/SerializerHelper.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ static class SerializerHelper
1313
{
1414
public static object Deserialize(this string input, Type type)
1515
{
16+
type = Nullable.GetUnderlyingType(type) ?? type;
17+
1618
if (String.IsNullOrEmpty(input))
1719
return type.GetDefaultValue();
1820

0 commit comments

Comments
 (0)