Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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");
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# list files in directory 
Csharp :: get application path c# 
Csharp :: how to get the startup path in console app 
Csharp :: print in c# 
Csharp :: regex for email c# 
Csharp :: Linq - Random Elements 
Csharp :: detecting a right click unity 
Csharp :: current directory in sln file c# 
Csharp :: c# get current date 
Csharp :: unity Protected 
Csharp :: get text between two strings c# 
Csharp :: unity script detect if in prefab edition mode 
Csharp :: unity save list to json 
Csharp :: move gameobject in unity 2d 
Csharp :: how to get all files from folder and subfolders in c# 
Csharp :: create asset menu unity 
Csharp :: get datacontext of parent wpf 
Csharp :: playerInputManager.JoinPlayer(....) 
Csharp :: c# unity camera follow player horizontal axis 
Csharp :: get values from range entity framework 
Csharp :: c# boiler code shortcut 
Csharp :: executable path with app name c# 
Csharp :: public vs internal c# 
Csharp :: when do i need to end a sentence with ; in c# 
Csharp :: random character c# 
Csharp :: unity mesh showing Instance 
Csharp :: c# console writeline array 
Csharp :: materials pink in unity 
Csharp :: base64 string to byte array c# 
Csharp :: object list to csv c# 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =