Answers for "c# read text file from current directory"

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
0

c# read file current directory

var path = Path.Combine(Directory.GetCurrentDirectory(), "\fileName.txt");
Posted by: Guest on September-21-2020

C# Answers by Framework

Browse Popular Code Answers by Language