我目前有:
UIEnumerable <IGrouping<PortableKey, FileInfo>>
从这段代码:
var queryDupFiles = from file in fileList
group file by new PortableKey { Name = file.Name, Length = file.Length }
into g
where g.Count() > 1
select g;
PortableKey 的代码是:
public class PortableKey
{
public string Name { get; set; }
public long Length { get; set; }
}
基本上过滤和抓取所有重复的文件。我如何得到它,以便我以这种方式拥有所有 FileInfo?
List<FileInfo> list