get the directory of the file in c# code example
Example: get directory of file c#
using System.IO;
string file = "C:\Documents\file.txt";
Path.GetDirectoryName(file);
using System.IO;
string file = "C:\Documents\file.txt";
Path.GetDirectoryName(file);