title: How to refactor this copy lines without empty ones from a RichTextBox to an ArrayList
body: <p>I want the user to add proxy addresses with copy and paste from the program interface, and when the button is pressed, I want to copy them into arraylist and continue with arraylist, but when the number of lines is high, it takes quite a long time. When I added 10,000 proxies and tried the button, it gave an error after waiting for a while. How can I quickly add items in the richtextbox to the arraylist list?</p>
  <p>My code:</p>
  <pre><code>ArrayList plist = new ArrayList();
      
  if (richTextBox1.Lines.Length &gt; 0 &amp;&amp; checkBox1.Checked == true)
                  {
                      for (int i = 0; i &lt; richTextBox1.Lines.Length; i++)
                      {
                          if (richTextBox1.Lines[i].ToString() != &quot;&quot;)
                          {
                              plist.Add(richTextBox1.Lines[i].ToString());
                          }
                      }
                  }
  </code></pre>