title: How to make InvariantCulture recognize a comma as a decimal separator?
body: <p>How do I parse <code>1,2</code> with <code>Single.Parse</code>? The reason of asking is because, when I am using <code>CultureInfo.InvariantCulture</code> I don't get 1.2 as I would like, but rather 12. </p>
  
  <p>Shouldn't "Invariant Culture" ignore the culture? </p>
  
  <p><a href="https://dotnetfiddle.net/UDYMYU" rel="noreferrer">Consider the following example</a>:</p>
  
  <pre><code>using System;
  using System.Globalization;
  
  public class Program
  {
      public static void Main()
      {
          Console.WriteLine(Single.Parse("1,2", CultureInfo.InvariantCulture));
          Console.WriteLine(Single.Parse("1.2", CultureInfo.InvariantCulture));
          float value;
          Console.WriteLine(Single.TryParse("1,2", NumberStyles.Float, CultureInfo.InvariantCulture, out value));
          Console.WriteLine(Single.TryParse("1,2", out value));
          Console.WriteLine(value);
      }
  }
  </code></pre>
  
  <p>The output of this will be </p>
  
  <blockquote>
    <p>12<br>
    1.2<br>
    False<br>
    True<br>
    12  </p>
  </blockquote>
  
  <p>But I was expecting:</p>
  
  <blockquote>
    <p>1.2<br>
    1.2<br>
    True<br>
    True<br>
    1.2  </p>
  </blockquote>
  
  <p><a href="https://stackoverflow.com/questions/3743469/system-convert-tosingle-problems-1-5-vs-1-5">Based</a> <a href="http://www.csharp-examples.net/iformatprovider-numbers/" rel="noreferrer">on</a> <a href="http://devio.wordpress.com/2009/10/15/parsing-culture-invariant-floating-point-numbers/" rel="noreferrer">my</a> <a href="https://stackoverflow.com/questions/3059587/c-sharp-float-to-string-conversion-decimal-separator-problem">reading</a> of <code>InvariantCulture</code> I should get that result, however I am not.</p>