开发者

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.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜