Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当通过方法将浮点值分配给 textBox.Text 时floatVal.ToString(),它会使本地文化分隔符成为,我如何防止这种情况发生?
floatVal.ToString()
,
.ToString(CultureInfo.InvariantCulture)至少在我的情况下,使用解决了这个问题。
.ToString(CultureInfo.InvariantCulture)