We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95a575e commit 333e999Copy full SHA for 333e999
1 file changed
engine/Sandbox.System/Extend/StringExtensions.cs
@@ -614,6 +614,7 @@ public static bool TryToType( this string str, Type t, out object Value )
614
{
615
Value = null;
616
617
+ t = Nullable.GetUnderlyingType( t ) ?? t;
618
if ( t == typeof( decimal ) ) { Value = str.ToDecimal(); return true; }
619
if ( t == typeof( float ) ) { Value = str.ToFloat(); return true; }
620
if ( t == typeof( double ) ) { Value = (double)str.ToFloat(); return true; }
0 commit comments