title: i want to display text from textfile in text box . how can i do this .. in C#
body: <p>i want  to display text from textfile  in text box . how can i do this .. in C# 
  Actually i m making text to speech converter in C# .. SO i want to open text file and want show text of that file in my textbox .. 
  here is my code</p>
  
  <pre><code>    private void button2_Click(object sender, EventArgs e)
      {
          OpenFileDialog O = new OpenFileDialog();
          O.ShowDialog();
          Loadfile(O.FileName);
  
      }
      private void Loadfile(string filename)
      {
          TextRange range;
          FileStream fStream;
          if (File.Exists(fileName))
          {
              range = new TextRange(textBox1.Text.TrimStart, textBox1.Text.TrimEnd);
              fStream = new FileStream(filename, FileMode.Open);
              range.Load(fStream, DataFormats.Text);
              fStream.Close();
          }
  
  
      }
  </code></pre>
  
  <p>i got error in textBox1.Text.TrimStart, textBox1.Text.TrimEnd .. i dont want to use Richtextbox because .. for that i have to use . Document property of richtextbox cz 4 tht i bound to use WPF ... 
  (richTextBox1.Document.ContentStart, richTextBox1.Document.ContentEnd)</p>
  
  <p>Please Help me on this </p>
  
  <p>Cheers !
  Wahib Idris</p>
  
  <p>Any help will be appreciated .. Thanx in advance</p>
  
  <p>Please Help</p>