Answers for "how to get directory path of a file in c#"

C#
3

get directory of file c#

using System.IO;

string file = "C:Documentsfile.txt";
Path.GetDirectoryName(file);
Posted by: Guest on December-03-2020
0

c# how to get a file path from user

FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.Description = "Custom Description"; 

if (fbd.ShowDialog() == DialogResult.OK)
{
    string sSelectedPath = fbd.SelectedPath;
}
Posted by: Guest on May-31-2020

Code answers related to "how to get directory path of a file in c#"

C# Answers by Framework

Browse Popular Code Answers by Language