load txt file into a string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I load a text file into a normal string?

I tried this:

System.IO.StreamReader file = new System.IO.StreamReader(@"\test.txt");
string test = file.ToString();

This does not work. The value of the string is "System.IO.StreamReader". How
can I do this?

Thanks for your help

Chris
 
Back
Top