// ファイルをハッシュ値でグループ化する // 全ファイルを読み込んでハッシュ値を計算するので遅いです var hashGroupQuery = from filehash in (from filename in files let hash = GetMD5String(filename) select new { Filename = filename, Hash = hash }) group filehash by filehash.Hash into hashGroup where hashGroup.Count() >= 2 select hashGroup;