views:

12

answers:

1

I happen to have a list of double in a class and databind it to a combobox. The problem I am experiencing is that the displayed text for double has a comma instead of the dot. Ex 2,56 isntead of 2.56.

The combo box seems to convert my doubles to string using the application culture

I cannot just change the application culture to Invariant. Any idea how I can force doubles in my application to use the invariant culture?

A: 

doubles are just numbers. They do not have a culture.

ComboBoxes, on the other hand, do. You can set it using the ComboBox.FormatInfo property.

James Curran