Unless I’m missing something, then you should be able to get away with something simple using Distinct()
. Granted it won’t be the most complex implementation you could come up with, but it will tell you if any duplicates get removed:
var list = new List<string>();
// Fill the list
if(list.Count != list.Distinct().Count())
{
// Duplicates exist
}