When a float value is assigned to a textBox.Text via floatVal.ToString()
method, it makes local culture separator a ,
How do I prevent this from happening?
Asked
Active
Viewed 331 times
0

user1306322
- 8,561
- 18
- 61
- 122
-
Do you just want to specify your own format? `floatVal.ToString("0.00")` ? – Blorgbeard Aug 29 '12 at 01:30
-
Format is different each time. Problem is the decimal point becomes a comma and my existing methods then convert the float number to something completely unwanted. – user1306322 Aug 29 '12 at 01:31
1 Answers
1
Using .ToString(CultureInfo.InvariantCulture)
solves this problem at least in my case.

user1306322
- 8,561
- 18
- 61
- 122