title: Replacing characters in windows form application
body: <p>I need to make a <code>windows form application</code> in <code>c#</code> that provides the user with a textbox, and upon clicking a button it changes the letters in the first textbox to a replacement in the other one. </p>
  
  <p><strong>For example:</strong><br>
  if I type "<strong>apple</strong>" in the first textbox and I have replaced "a" with "b" and "p" with "o" it should spell "<strong>baoole</strong>". </p>
  
  <p>This process also has to work in reverse. I don't know how to accomplish this.</p>
  
  <p>I tried using .Replace with every pair of letters in the alphabet ex: "a","b"; "c","d";, But it only replaced the first letters so if I typed "c" it would not change to "d". Once I tried to then replace "d","c"; it overlapped and my program wouldn't work. I then tried this:</p>
  
  <pre><code>if (richTextBox1.Text.Contains("a"))
  {
      richTextBox2.Text=richTextBox1.Text.Replace("a", "b");
  }
  if (richTextBox1.Text.Contains("b"))
  {
      richTextBox2.Text=richTextBox1.Text.Replace("b", "a");
  }
  </code></pre>
  
  <p>But it only successfully replaced the first character. I am sorry if I missed anything obvious, I am learning c# and am eager to learn more. Thank you for your time and knowledge. </p>