title: C# richtextbox and reading huge file
body: <p>I am reading a huge file (hundreds of MB) and displaying  it to a richtext box. my program would freeze when I run it. can anybody give me advice? is is because the way I read the file? or is it because there is somekind of limit on richtextbox ? I tried to increase the maxLength properties 2147483647, but it says "property value is not valid  is not a valid value for INt32" . My application is 64 bit so why this happens? and how do I make the int32 to be 64 ?</p>
  
  <pre><code>            StreamReader sr = new StreamReader(file_name1);
              string myLine;
              while ((myLine = sr.ReadLine()) != null)
              {
                  richTextBox1.AppendText(myLine+"\n");
                  count_lines++;
  
              }
              sr.Close();
              textBox2.Text = count_lines.ToString(); ;
  </code></pre>