S
Scott Durrett
Does anyone know how to retrieve the file list sorted or how to sort this
thing? I'm wanting to sort them by date.
Thanks
Scott
thing? I'm wanting to sort them by date.
Thanks
Scott
Does anyone know how to retrieve the file list sorted or how to sort this
thing? I'm wanting to sort them by date.
Maqsood Ahmed said:You can store the FileInfo array in an ArrayList and call ArrayList.Sort
method passing your IComparer's object as IComparer as parameter.
MyComparer myComp = new MyComparer;
FileInfo[] fileInfoArray = System.IO.DirectoryInfo.GetFiles("C:\Folder
1");
ArrayList list = new ArrayList(fileInfoArray);
list.Sort(myComp);