mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-09 00:46:19 +00:00
Fixing issue 155 with exponential format parsing (https://github.com/JKorf/CryptoExchange.Net/issues/155)
This commit is contained in:
parent
417cf2f9ac
commit
91e8123679
@ -106,7 +106,7 @@ namespace CryptoExchange.Net.Converters
|
|||||||
|
|
||||||
if ((property.PropertyType == typeof(decimal)
|
if ((property.PropertyType == typeof(decimal)
|
||||||
|| property.PropertyType == typeof(decimal?))
|
|| property.PropertyType == typeof(decimal?))
|
||||||
&& (value != null && value.ToString().Contains("e")))
|
&& (value != null && value.ToString().IndexOf("e", StringComparison.OrdinalIgnoreCase) >= 0))
|
||||||
{
|
{
|
||||||
if (decimal.TryParse(value.ToString(), NumberStyles.Float, CultureInfo.InvariantCulture, out var dec))
|
if (decimal.TryParse(value.ToString(), NumberStyles.Float, CultureInfo.InvariantCulture, out var dec))
|
||||||
property.SetValue(result, dec);
|
property.SetValue(result, dec);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user