TODO:
Have you ever wanted to read the contents of a text file in C#?
SOLUTION:
string filedata = "";
string inFileName = "C:\\test.txt";
using (StreamReader sr = new StreamReader(inFileName))
{
filedata = sr.ReadToEnd();
}
NOTES:
There are no notes on this topic.