Add conversion support for long type in ObjectConverter
The ObjectConverter file has been updated to support conversion of 'long' type. This is done by adding an additional conditional statement for checking the underlying source type for 'long', then returning the converted value.
This commit is contained in:
parent
3aedf27727
commit
8ceb76ddbe
|
|
@ -167,6 +167,9 @@ public static class ObjectConverter
|
|||
|
||||
if (underlyingSourceType == typeof(double))
|
||||
return Enum.ToObject(underlyingTargetType, Convert.ChangeType(value, typeof(int)));
|
||||
|
||||
if (underlyingSourceType == typeof(long))
|
||||
return Enum.ToObject(underlyingTargetType, Convert.ChangeType(value, typeof(int)));
|
||||
}
|
||||
|
||||
if (value is string s)
|
||||
|
|
|
|||
Loading…
Reference in a new issue