I need to group and sort the general list <>. I have a list of objects representing files, and each of these objects has the FileName, FileType, and FileDate property. FileType is defined as an enumeration.
I have working code that allows me to group file lists using FileType.
var fileGroups = fileList.GroupBy(f=> f.FileType)
foreach (var group in fileGroups )
{
foreach (var file in group)
{
}
}
What I would like to do is to arrange the filegroups by the value of the FileType enumeration, and then to each group in the filegroups using FileDate.
source
share