databinding list of double with invariant culture
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?
doubles are just numbers. They do not have a culture.
ComboBox
es, on the other hand, do. You can set it using the ComboBox.FormatInfo
property.
精彩评论