add file to combobox c#

60

add file to combobox c# -

var folder = new DirectoryInfo(folderPath);
var files = folder.GetFiles("*.pdf");

myComboBox.DisplayMember = "Name";
myComboBox.ValueMember = "FullName";
myComboBox.DataSource = files;
myComboBox.SelectedItem = null;

Comments

Submit
0 Comments