string file = @"C:\programs\enable1.txt";
using (StreamReader reader = new StreamReader(file))
{
string v = await reader.ReadToEndAsync();
count += v.Length;
}
// Read the file as one string.
string text = System.IO.File.ReadAllText(@"C:\Users\Public\TestFolder\WriteText.txt");
// Read each line of the file into a string array
string[] lines = System.IO.File.ReadAllLines(@"C:\Users\Public\TestFolder\WriteLines2.txt");
foreach (string line in lines)
{
// Use a tab to indent each line of the file.
Console.WriteLine("\t" + line);
}