Im looking to group and sort a Generic List<>. I have a list of objects representing files and each of these objects has a FileName, FileType and FileDate property. FileType is defined as an enumeration.
I have some working code which allows me to group together lists of files by FileType.
var fileGroups = fileList.GroupBy(f=> f.FileType)
foreach (var group in fileGroups )
{
foreach (var file in group)
{
}
}
What I would like to be able to do is order fileGroups by the FileType enumeration value and then each group within fileGroups by the FileDate.
You need the groups sorted (1) and each of the groups sorted internally (2);