Im using Visual Studio 2010. My code has a strange behavior
With this code I can parse xml file.
XDocument document = XDocument.Load("http://www.studiovincent.net/list.xml");
XElement resourcesElement = document.Root.Element("resources");
XElement resourceElementVincent = (from resourceElement in resourcesElement.Elements("resource")
where resourceElement.Elements("field").Single(fieldElement => fieldElement.Attribute("name").Value == "name").Value == "Vincent"
select resourceElement).Single();
decimal tasso = Math.Round(decimal.Parse(resourceElementVincent.Elements("field").Single(fieldElement => fieldElement.Attribute("name").Value == "age").Value) / Convert.ToInt64(1.00E+006), 6);
string gigi = Math.Round(41 * tasso, 4).ToString();
Console.WriteLine("{0}", gigi);
Console.ReadLine();
All work correctly, until I change regional options. If I select italian:
This is OUTPUT: 0,0013
If I select United States in regional options, this is OUTPUT: 0.0000
I dont know how to solve this issue.
Thanks in advance.