Is there a built-in method to compare collections?

Enumerable.SequenceEqual

Determines whether two sequences are equal by comparing their elements by using a specified IEqualityComparer(T).

You can’t directly compare the list & the dictionary, but you could compare the list of values from the Dictionary with the list

Leave a Comment