Horje
c# winforms select folder dialogue Code Example
c# winforms select folder dialogue
using(var fbd = new FolderBrowserDialog())
{
    DialogResult result = fbd.ShowDialog();

    if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(fbd.SelectedPath))
    {
        string[] files = Directory.GetFiles(fbd.SelectedPath);

        System.Windows.Forms.MessageBox.Show("Files found: " + files.Length.ToString(), "Message");
    }
}
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);
}




Csharp

Related
most wishlisted games on steam Code Example most wishlisted games on steam Code Example
play a sound c# Code Example play a sound c# Code Example
get host ip address asp.net core Code Example get host ip address asp.net core Code Example
c# resize image keep aspect ratio Code Example c# resize image keep aspect ratio Code Example
how to make a method wait in unity Code Example how to make a method wait in unity Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9