title: Converting danish double to string with multiple "." separator [ Thousand ]
body: <p>I'm trying to convert number in <code>string</code> format to <code>double</code>. It can be either <em>English</em> culture or <em>Danish</em> culture. Here is the code I'm trying</p>
  
  <pre><code>public static double ToDoubleOrDefault(this string value)
  {
      var doubleValue = default(double);
  
      var danishCultureInfo = new CultureInfo("da-DK");
      var englishCultureInfo = new CultureInfo("en-US");
  
      if (double.TryParse(value, 
                          NumberStyles.AllowDecimalPoint, 
                          englishCultureInfo, 
                          out doubleValue))
      {
          return doubleValue;
      }
      else if (double.TryParse(value, 
                               NumberStyles.AllowDecimalPoint,
                               danishCultureInfo, 
                               out doubleValue))
      {
          return doubleValue;
      }
      return doubleValue;
  }
  </code></pre>
  
  <p>It works fine if till the <em>Danish</em> number have <em>more than one</em> <code>"."</code> <em>separator</em>.</p>
  
  <p>Eg: <strong>"1.908.746"</strong></p>
  
  <p>Is there a way were it can be done?</p>