title: Read textfile and show it in richtextbox. Show one word from Richtextbox in ComboBox then find it in text and replace it with TextBox.text
body: <p>I have opened a .CSV file in RichTextBox.I added every line's first word to CombobBox items. I want to edit this a specific word and then save it back to the File.</p>
  
  <p>This is how i open the file to richTextBox1.</p>
  
  <pre><code>        OpenFileDialog ofd = new OpenFileDialog();
          ofd.Filter = "Csv files (.csv)|*.csv";
          ofd.Title = "Open a file...";
          if (ofd.ShowDialog() == DialogResult.OK)
          {
              StreamReader sr = new StreamReader(ofd.FileName);
              richTextBox1.Text = sr.ReadToEnd();
          }
  </code></pre>
  
  <p>Now i want a Button that finds my comboBox1.Text in richTextBox and replace it with txtbox.Text.</p>
  
  <p>My button looks like this:</p>
  
  <pre><code>        private void button1_Click(object sender, EventArgs e)
          {
              using (TextReader reader = new StringReader(richTextBox1.Text))
              {
                  string str = reader.ReadToEnd();
                  string cbtxt = comboBox1.Text;
                  string tbtxt = txtbox.Text;
                  str = str.Replace(cbtxt, tbtxt);
              }
          }
  </code></pre>
  
  <p>I would add the method to the end of this button that would save back the text from richTextBox to my .CSV file but this replace method doesnt replace anything in my richTextBox.</p>
  
  <p>My .CSV file (in richTextBox) looks like this:</p>
  
  <blockquote>
    <p>somestring,somenumber,somespecialcharacters;<br>
    somestring2,somenumber2,somespecialcharacters2;</p>
  </blockquote>
  
  <p>It has about 50 lines,and my combobox is filled with the first words of every line like: "somestring" "somestring2".
  When i click on somestring (then its my combobox.text) then i write "newstring" to my txtbox.text. When i click my button it should find comboBox.text in richtxt and replace it with my txtbox.text.</p>
  
  <p>Any ideas why it doesnt work?</p>