FileSystem.GetDirectories

  • Thread starter Thread starter Mary Ann Kingry
  • Start date Start date
M

Mary Ann Kingry

Does anyone know in what order the directories will be returned? (i.e.
alphabetically or in date order)

Thanks
 
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.asp
 
Hello Jim,
Add the entries to a SortedList object.. then you can have it sorted any
way you wish.

-Boo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top