On Oct 27, 9:05 am, Cerebrus <[email protected]> wrote:
> No, I think the question should be instead asked "What determines the
> order (index) of files in the array ?" The GetFiles() method does not
> suggest any particular order at all (and neither should it).
> Therefore, if your logic depends on the indexes of files in the array,
> the logic is flawed. If it is still essential, then you can implement
> a sorting comparer for the FileInfo class (examples easily found
> online) that sort the array of FileInfos bases on the alphabetical
> order of their filenames.
>

OK, I will try sorting comparer for the FileInfo class. Thank you for
the suggestion. So my only question is, once I sort the array. I want
to determine the index or location of the current file loaded in my
program. Is that what I use the For-Each method for? To locate it in
the array?

Reply via email to