title: How to change the global culture number seperator from '.' to ','?
body: <p>Is there anyway in C# to change &quot;.&quot; to &quot;,&quot;? I live in Belgium and here we use a comma instead of a dot. When I type for example 1,1 C# says its not a number. It only accepts 1.1 or 1.</p>
  <p>Here's my <code>cshtml</code> code:</p>
  <pre><code>&lt;div class=&quot;form-group&quot;&gt;
      &lt;label asp-for=&quot;preSeriousness&quot; class=&quot;control-label&quot;&gt;Pre seriousness:&lt;/label&gt;
      &lt;input asp-for=&quot;preSeriousness&quot; class=&quot;form-control&quot; type=&quot;text&quot; required /&gt;
      &lt;span asp-validation-for=&quot;preSeriousness&quot; class=&quot;text-danger&quot;&gt;&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Here's my controller code:</p>
  <pre><code>preSeriousness = Convert.ToDouble(collection[&quot;preSeriousness&quot;]),
  </code></pre>
  <p>Here's code from my start.cs configure method:</p>
  <pre class="lang-cs prettyprint-override"><code>var cultureInfo = new CultureInfo(&quot;nl-BE&quot;);
  cultureInfo.NumberFormat.CurrencySymbol = &quot;€&quot;;
  cultureInfo.NumberFormat.NumberDecimalSeparator = &quot;,&quot;;
  cultureInfo.NumberFormat.CurrencyDecimalSeparator = &quot;,&quot;;
  
  CultureInfo.DefaultThreadCurrentCulture = cultureInfo;
  CultureInfo.DefaultThreadCurrentUICulture = cultureInfo;
  </code></pre>
  <p>When I run this code it writes nl-BE:</p>
  <pre><code>CultureInfo cultureInfo = Thread.CurrentThread.CurrentCulture;
  Console.WriteLine(cultureInfo);
  </code></pre>
  <p>Here's an image to make it more clear:</p>
  <p><a href="https://i.stack.imgur.com/y8F7x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y8F7x.png" alt="enter image description here" /></a></p>