Different results work with the same application locally and remotely - windows application

Something strange is happening with my application. When I run it locally, I get the results, as it should be, a normal decimal number. But when I run the same application from the server, the decimal is divided by 100. I use the same code, deploying the same application, and I wonder why this is happening. Every tip is welcome. Thanks in advance, Laziale

+3
source share
1 answer

Obviously, the server works with a different locale.

Whenever you go from a string to a decimal, the locale (CultureInfo) matters.

, ConvertToDecimal("1.00") 1 100 , . .

, ConvertToDecimal("1.00", someCulturInfo).

, .

+3

All Articles