mrojas
Member
I'm trying to populate a combo box with unique file name extensions found in a given directory
I create an ArrayList to store directory files' names. I know that this array may have file names with duplicate file name extentions.
I traverse the given directory inserting extension names in array elements
I pass the now filled ArrayList to a function. This function removes duplicates. It does so the first time the application is run at load time without any error messages. Subsequent execution of this function, after the user selects a folder, it generates the following error message:
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
I create an ArrayList to store directory files' names. I know that this array may have file names with duplicate file name extentions.
I traverse the given directory inserting extension names in array elements
I pass the now filled ArrayList to a function. This function removes duplicates. It does so the first time the application is run at load time without any error messages. Subsequent execution of this function, after the user selects a folder, it generates the following error message:
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index