diff --git a/src/NSC/Extensions/StringExts.cs b/src/NSC/Extensions/StringExts.cs index c8a7099..754ee17 100644 --- a/src/NSC/Extensions/StringExts.cs +++ b/src/NSC/Extensions/StringExts.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Net; using System.Text; +using System.Threading; namespace NetSwiftClient { @@ -38,6 +39,9 @@ public static object SafeConvert(this string s, Type t, object defaultValue) public static object SafeConvert(this string s, Type t, Func defaultValueGenerator) { + // Converting from US numbers formatting + Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-us"); + if (String.IsNullOrEmpty(s)) return defaultValueGenerator(); if (!t.IsValueType)