Home All Groups Group Topic Archive Search About

FileSystem.GetDirectories

Author
7 Jun 2006 6:47 PM
Mary Ann Kingry
Does anyone know in what order the directories will be returned? (i.e.
alphabetically or in date order)

Thanks

Author
7 Jun 2006 8:15 PM
Jim Wooley
> Does anyone know in what order the directories will be returned? (i.e.
> alphabetically or in date order)

Regardless of which way they are currently returned, I wouldn't create a
mission critical application that depended on that order. I would recommend
that you get them as they come and then worry about sorting them later. Even
if it works now, MSFT could easily change the sort order in a future OS/Framework
version as they did with reflection between 1.1 and 2.0. (see http://devauthority.com/blogs/jwooley/archive/2005/11/02/597.aspx)

Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx
Author
8 Jun 2006 12:49 AM
GhostInAK
Hello Jim,
Add the entries to a SortedList object.. then you can have it sorted any
way you wish.

-Boo

Show quote
>> Does anyone know in what order the directories will be returned?
>> (i.e. alphabetically or in date order)
>>
> Regardless of which way they are currently returned, I wouldn't create
> a mission critical application that depended on that order. I would
> recommend that you get them as they come and then worry about sorting
> them later. Even if it works now, MSFT could easily change the sort
> order in a future OS/Framework version as they did with reflection
> between 1.1 and 2.0. (see
> http://devauthority.com/blogs/jwooley/archive/2005/11/02/597.aspx)
>
> Jim Wooley
> http://devauthority.com/blogs/jwooley/default.aspx

AddThis Social Bookmark Button