selection - How to fill a combobox with available filenames -


I have direcory with the variable amount of files when a C #-window-form is triggered, I want to read all the filenames and show them in the dropdown-blanket box. Pressing a button should give the selected filename how can I do it? Thanks for the help

Resolve:

  System.IO DirectoryInfo myPath = New system Io Directory Info (MyPathini); System in Foreach (myPath.GetFiles (). IO.FileInfo f) {comboBox1.Items.Add (f.Name); }    

Comments

Popular posts from this blog

sql - Return Function using Cursor -

c++ - why does this code produce a runtime error? -

javascript - Is there any way to add a new parameter to a function programmatically? -