C# how to compare two list?

Have a list list1

Format: hash (32 characters) = file Name
Example 8c75d84d6650219ec65f664b5cd8221b = DbRef.dll

There list2
Format: hash (32 characters)
Example 5139da6f02b10595c44460496a50552a

You need to compare the hashes and in case of coincidence to fulfill
Console.Write(print the file name when finding);

Preferably a ready example, thank you very much in advance !!! :)
July 9th 19 at 13:00
3 answers
July 9th 19 at 13:06
Compare two sheets using LINQ JOIN and print the result
July 9th 19 at 13:02
foreach (var item in list1.Where(item => list2.Contains(item.Substring(0, 32))))
 // Console.WriteLine(item);
Yes, he will find that I myself would be example wrote what?

in list1 entry 8c75d84d6650219ec65f664b5cd8221b = DbRef.dll
in list2 entry 8c75d84d6650219ec65f664b5cd8221b

how will he compare it?

I need the comparison compared only the first 32 characters - that is, hashes. - Rigoberto commented on July 9th 19 at 13:05
If the hash string, then what's the problem? Take the first 32 characters and compare. Corrected the answer. - Clarabelle12 commented on July 9th 19 at 13:08
: all thanks more is needed)))) - Rigoberto commented on July 9th 19 at 13:11
July 9th 19 at 13:04
Go cycle on the first list, find the match for the second cycle. Two loops, one nested.

It head-on. Else you can create from one list to the dictionary, the search will probably be faster, etc.
crap what the heck there are 3 of the cycle? 1 you can do I can convert a string 8c75d84d6650219ec65f664b5cd8221b = DbRef.dll Oh, hash it and compare but I don't know how. - Rigoberto commented on July 9th 19 at 13:07

Find more questions by tags C#