Comma as Decimal Symbol creating problem
-
Hi All, I have a windows appliation. It creates problem when it runs with Dutch(Belgium) or some other language settings that set Decimal Symbol as Comma(,) and Digit Separator as Dot(.) Due to such settings, number like 2.22 or 22.2 will be considered as 222. Is there any way to run .net appliation under default English(US) settings irrespective of settings of Regional and Language Options? Without changing global settings on user's PC?
Regards, -SIFAR.
-
Hi All, I have a windows appliation. It creates problem when it runs with Dutch(Belgium) or some other language settings that set Decimal Symbol as Comma(,) and Digit Separator as Dot(.) Due to such settings, number like 2.22 or 22.2 will be considered as 222. Is there any way to run .net appliation under default English(US) settings irrespective of settings of Regional and Language Options? Without changing global settings on user's PC?
Regards, -SIFAR.
Place this code under your main class.
//Force application to use culture En-US. System.Globalization.CultureInfo cultureInfo = System.Globalization.CultureInfo.GetCultureInfo("en-US"); System.Threading.Thread.CurrentThread.CurrentCulture = cultureInfo;
happy coding...