title: Converting dot in comma in Visual C#
body: <p>I've met a problem during programming a calculator in Visual C#. I want to make an automatic conversion when I write in Textbox, during execution, "." (dot) in "," (comma). These conversion code I wrote doesn't work properly:</p>
  
  <pre><code>string s = textBox1.Text;
         int nr = s.Length;
         char[] a = s.ToCharArray();
  
          for (int i=1; i&lt;=nr; i++)
          {
              if (a[i] == '.')
                  a[i] = ',';
          }
  </code></pre>
  
  <p>What should be corrected here? Thanks in advance.</p>
  
  <p>P.S. I'm sorry if this kind of thread already exists here, I couldn't find something like that.</p>