Answers for "access a txt file within a project c#"

C#
6

c# read all text from a file

using (StreamReader streamReader = new StreamReader(path_name, Encoding.UTF8))
{
  contents = streamReader.ReadToEnd();
}
Posted by: Guest on April-22-2020
2

how to read a text file C#

string[] text = System.IO.File.ReadAllLines(@"C:usersusernamefilepathfile.txt");
Posted by: Guest on October-06-2020

C# Answers by Framework

Browse Popular Code Answers by Language