Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   C# code problem while working in Dutch locale (http://www.go4expert.com/forums/c-sharp-code-dutch-locale-t6017/)

Leo 24Aug2007 18:09

C# code problem while working in Dutch locale
 
I have an application that runs in English and Dutch locale.

I have a dataset that retrieves decimal values from the database.I use that data and convert them to Double value and display in my report.

e.g: i have a value say 150.89 in the database.Once that is retrieved from the database in to the dataset , the value is stored as 150,89 in the dataset. And once i try to convert 150,89 to double the value becomes 15089.

I think if i can preserve the value as 150.89 and then when i convert to double , it will become 150,89.

Please help me in this.

shabbir 24Aug2007 18:26

Re: C# code problem while working in Dutch locale
 
You should be checking the decimal character of the locale and in some locale its ,

Now actual test case should be when you have the data entered in the locale should be consistent.

Leo 24Aug2007 18:37

Re: C# code problem while working in Dutch locale
 
How can i check what is the current locale i am running my application.

shabbir 24Aug2007 22:10

Re: C# code problem while working in Dutch locale
 
Using the CultureInfo class.


All times are GMT +5.5. The time now is 22:09.