When you save an XML file, you do not use InvariantCulture. Therefore, on my
computer (French), float number are exported with commas instead of dots (0,25
instead of 0.25). This then creates problems when reading the files. You need
to change the following line in the WriteFloat method:
writer.WriteElementString( "real", val.ToString() );
to
writer.WriteElementString( "real", val.ToString( CultureInfo.InvariantCulture )
);
You also need to change when reading the number in ReadFloat:
return float.Parse(dict[name] );
to
return float.Parse(dict[name], CultureInfo.InvariantCulture );
Hope this helps,
Thanks!
Francois.
Original issue reported on code.google.com by guibert....@gmail.com on 28 Nov 2011 at 9:36
Original issue reported on code.google.com by
guibert....@gmail.com
on 28 Nov 2011 at 9:36