Hi,


I am trying the following

String str = "1.3";
float f = float.Parse(str);

On an american system this will work perfectly.
result: f = 1.3

However in some european countries "." is not the decimal seperator but "," is the decimal seperator.
result: f = 13

I need to get this code running on all platforms though. I could ofcourse just replace the "," and "." signs. But then it would no longer run on american systems.

How is this problem normally fixed? In my program "." should always be seen as a decimal seperator.

This is important because I am reading files with coordinates that need to be parsed correctly. In these files (*.x3d) the "." sign is the decimal seperator.

Thanks in advance for all help!