Answers for "open directory and select file c#"

C#
-1

c# file directory selection

CommonOpenFileDialog dialog = new CommonOpenFileDialog();
dialog.InitialDirectory = "C:\\Users";
dialog.IsFolderPicker = true;
if (dialog.ShowDialog() == CommonFileDialogResult.Ok)
{
    MessageBox.Show("You selected: " + dialog.FileName);
}
Posted by: Guest on August-05-2020

C# Answers by Framework

Browse Popular Code Answers by Language