// Example #1
// Read the file as one string.
string text = System.IO.File.ReadAllText(@"C:UsersPublicTestFolderWriteText.txt");
// Example #2
// Read each line of the file into a string array. Each element
// of the array is one line of the file.
string[] lines = System.IO.File.ReadAllLines(@"C:UsersPublicTestFolderWriteLines2.txt");