
Help: Convert string to decimal (or double)
.NET used the current Windows regional settings (Control Panel).
If the string is always with a dot '.' as decimal separator,
try the 'InvariantCulture' :
double d = Double.Parse( "3.1415", CultureInfo.InvariantCulture );
or switch thread culture:
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
dd = Double.Parse( "3.1415" );
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconusinginvari...
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconformattingn...
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconnumericform...
--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/