Comparing Two Arrays
I was looking at some old code today that was checking if two byte arrays had the same data in them. It was a simple loop that compared each element. I recalled my blog post from November of last year about comparing collections/arrays in MSTest and thought, "I wonder if LINQ has something similar"?
As a matter of fact it does! IEnumerable<T>.SequenceEqual() does exactly what I was looking for. By default, it uses the type's default comparer, or you can supply your own. Very nice!