>>
>>If you can use Linq/lambas, you can do something like this:
>>
>>
>>System.IO.DirectoryInfo info = new System.IO.DirectoryInfo(@"C:\");
>>System.IO.FileInfo[] files = info.GetFiles("*.jpg");
>>List<System.IO.FileInfo> sortedFiles = files.OrderBy(x => x.CreationTime).ToList();
>>
>>
>>I don't know that internally it's any more efficient than looping, but it's definitely simple.
>
>OK, so I know you probably can't use it (sorry), but it's so cool I just had to post it. Anyway, one thing I didn't point out was that you needed to have a "using System.Linq" and, of course, a reference to the System.Core.
well except for the last line it was close to what I did. I will take me a minute to figure out the last line as I am not real linq savy. It appears to create a list but includes the sort order. It is pretty cool.
Tim
Timothy Bryan