I wanted to know if it is possible to obtain the path of a file which is listed in a combo, I mean, I've put the following code to list the name of the files in a folder in a combo:
DirectoryInfo d = new DirectoryInfo("1.76");
FileInfo[] files = d.GetFiles("*.bin");
comboBoxEdit1.Properties.Items.Clear();
comboBoxEdit1.Properties.Items.AddRange(files);
And now my question is, can I get the address of that file?
I would not use a case because I want to be able to introduce new files.
Try doing it comboBoxEdit1.SelectedIndex. in this way but I ran out of ideas on how to do the rest.
Another thing I think is to get the name of the selected object and make a comparison with the list of files in the folder and if it matches one get that address from that file and that it does in a variable, the problem is that I have the idea but I would not know how to do the code.
I think what I'm asking is impossible to do, but if someone knows how to do it, I'd really appreciate it if you could explain how, thanks.