title: Count and replace all vowels in a textbox
body: <p>I need to count all vowels and replace it with the letter x, in a textbox. I managed to do the counting part and here's the code, but i'm having problem with replacing all vowels in the textbox with the letter x. Can someone help me?</p>
  
  <pre><code>int total = 0;
  
  string sentence = textBox1.Text.ToLower();
  char[] vowels = { 'a', 'e', 'i', 'o', 'u', 'y'};                   
  {
        total++;
  }
  
  total = sentence.Count(c =&gt; vowels.Contains(c));
  MessageBox.Show("There are " + total++ " vowels";
  
  for (int i = 0; i &lt; sentence.Length; i++)
  </code></pre>
  
  <p><strong>EDIT 1</strong>:</p>
  
  <p>Thank you all for helping. For some reason the vowels in my textbox doesnt change!!! It does the counting but no replacement of the letter x. I've tried all the solutions here, but still nothing happens to my the vowels in the textbox.</p>