Hello, I wrote a simple program which allows to test the number in double type. The objective is to read an xml file according to the decimal symbol chosen by the user.
when the user changes the configuration of decimal symbol the program must work with this modification without changing each time the xml file.
XDocument xdoc = XDocument.Parse(Properties.Resources.Number); string number = xdoc.Element("Number").Attribute("value").Value;double result; var isDouble = Double.TryParse(number, out result); if (!isDouble)Console.WriteLine("Error:Number is not a double"); elseConsole.WriteLine("Congratulations: it's a Double number");
so how do I process my code to make the value="1,2" acceptable even if the user changes their decimal symbol?