title: Skip text in RichTextBox
body: <p>I would skip the text in the field, if there is no text, but if this is to add text to the beginning and the end. I'm trying like this but it add text every line.</p>
  
  <pre><code>    private void zmien(string a, string b)
      {
  
  
          {
              if (richTextBox1.Text.Length &gt; 0)
              {
                  string[] lines = richTextBox1.Lines;
                  for (int i = 0; i &lt; lines.Length; i++)
                  {
                      if (richTextBox1.Text.Length == 0)
                      {
                          for (int j = 0; i &lt; lines.Length; i++)
                              lines[i] = Environment.NewLine;
                      }
                      else
                          lines[i] = a  + lines[i] + b;
                  }
                  richTextBox1.Lines = lines;
                  //richTextBox1.SelectedText = "test" + lines;
              }
          }
      }
  </code></pre>