This is a very easy problem that I have been stuck on.
I have a IEnumerable IGrouping object with grouped up common key items in it. I now need to compare each of the same common key item in the IEnumerable IGrouping object itself. I used 2 foreach loop to achieve that but the problem is the foreach causes repetition. I need to loop and compare each item without repetition of the one which already went through.
Parallel.ForEach((sameQuickHashGroups, quickHashGroup) =>
{
foreach (var groupFile in quickHashGroup)
{
foreach (var groupFile2 in quickHashGroup)
{
if (HashTool.ByteToByteCompare(groupFile.FileName, groupFile2.FileName))
{
groupFile.FullHash = count.ToString();
groupFile2.FullHash = count.ToString();
}
}
count;
}
});
Can anyone solve this?