I’m working on a bit of c# code that first has the user click a directory button and select a folder. How do I load a combobox with the contents of that folder(it will be text files)? Since the dir can change depending on the folder selected, I’m not sure how to go about this.
From comment:
foreach (String file in System.IO.Directory.GetFiles(?????)) {
comboBox1.Items.Add(new System.IO.FileInfo(file).Name);
}
I don’t know what to put in place of ???? to get it to work.
You can try something as simple as this:
Assumes WinForms.