c# current file directory code example
Example 1: c# read file current directory
var path = Path.Combine(Directory.GetCurrentDirectory(), "\\fileName.txt");
Example 2: get directory of file c#
using System.IO;
string file = "C:\Documents\file.txt";
Path.GetDirectoryName(file);