title: C# convert any format string to double
body: <p>I tried searching google and stackoverflow without success.</p>
  
  <p>I'm having a problem with "Input string was not in a correct format." exception with an application I'm working at.</p>
  
  <p>Thing is, that I convert some double values to strings with doubleNumber.ToString("N2"); in order to store them in XML file. When I switch testing machines, XML file stored on one can't be returned back to double values.</p>
  
  <p>I've tried all of the solutions I could think of, but setting number culture didn't work, using CultureInfo.InvariantCulture, replacing characters also doesn't work. Sometimes the values are stored like "3,001,435.57" and sometimes (on other PC) like "3.001.435,57".</p>
  
  <p>Is there some function or a way to parse a double from string, whatever the input format is?</p>
  
  <p>Thanks.</p>