I have this code:
string[] dirs = Directory.GetFiles(@"c:\myFolder\", "*.doc");
How do I do the same code, if I change "*.doc" with the comboBox. I have done the code that a user selects a filter from the comboBox.
I did:
string[] dirs = Directory.GetFiles(@"c:\myFolder\", comboBox1.SelectedItem.ToString());
but it is not working... it doesn`t fill the aray dirs (in the 1st upper case it does)!