title: Putting textfile into Listbox using streamreader
body: <p>I was wondering how i can make the program read a text file and put the contents in the listbox using streamreader?</p>
  
  <pre><code> private void button1_Click(object sender, EventArgs e)
      {
  
   }         (StreamReader stRead = new StreamReader("C:\Users\tommy\Desktop\WindowsFormsApplication9\WindowsFormsApplication9\bin\Debug\transactions.txt"))
  {
      while (!stRead.EndOfStream)
      {
          ListBox1.Items.Add(stRead.ReadLine());
      }
  </code></pre>