file reading in c# code example
Example 1: read file c#
string text = File.ReadAllText(@"c:\file.txt", Encoding.UTF8);
Example 2: how to read a text file C#
string[] text = System.IO.File.ReadAllLines(@"C:\users\username\filepath\file.txt");
string text = File.ReadAllText(@"c:\file.txt", Encoding.UTF8);
string[] text = System.IO.File.ReadAllLines(@"C:\users\username\filepath\file.txt");