Click here to Skip to main content
15,041,548 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I am trying to save and load some values from xml file using c#.

I have the xml file data like this.

I have some node like this

It is saving like that when i save to xml file. when i load from xml file i am able to get numeric format separated with cama (",") and assigning to double variable in my calculation using "double.parse" method and i am not getting any error. its working perfectly.

When i use same method (double.parse)for numeric format separated with (".") point then i am getting error like "input string format was incorrect".

Can anyone help me.
[no name] 23-Jul-13 9:17am
Try using

1 solution

Have you tried replacing all the '.' inside with a ','. You can use a simple replace command.

string str = "0.52";
str = str.ToString().Replace(".", ",");
PIEBALDconsult 23-Jul-13 9:44am
Please don't use Replace for that.
vebi1000 23-Jul-13 10:27am
Its working but is it the standard way! so that i can use like this whenever i need.
[no name] 23-Jul-13 14:10pm
yes, and also why the down vote?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900