You could use Enumerable.SequenceEqual
. This works for any IEnumerable<T>
, not just arrays.
More Related Contents:
- Determine if a number can be made with prepicked numbers and times
- How to convert UTF-8 byte[] to string
- How do I clone a range of array elements to a new array?
- Comparing two byte arrays in .NET
- How to delete an element from an array in C#
- printing all contents of array in C#
- How do I concatenate two arrays in C#?
- How do arrays in C# partially implement IList?
- How do I convert struct System.Byte byte[] to a System.IO.Stream object in C#?
- Merging two arrays in .NET
- Why we have both jagged array and multidimensional array?
- How would you compare two XML Documents?
- Declare a const array
- Why do C# multidimensional arrays not implement IEnumerable?
- Overhead of a .NET array?
- How to “flatten” or “index” 3D-array in 1D array?
- How do you get the width and height of a multi-dimensional array?
- What is the use of the ArraySegment class?
- How to compare arrays in C#? [duplicate]
- .Net Data structures: ArrayList, List, HashTable, Dictionary, SortedList, SortedDictionary — Speed, memory, and when to use each? [closed]
- Correlation of two arrays in C#
- How to get a dimension (slice) from a multidimensional array
- Difference between the System.Array.CopyTo() and System.Array.Clone()
- Wildcard equivalent in C# generics
- What interfaces do all arrays implement in C#?
- Operator ‘==’ cannot be applied to operands of type ‘char’ and ‘string’
- Why do arrays in .net only implement IEnumerable and not IEnumerable?
- Using XmlSerializer with an array in the root element
- Is it possible to extend arrays in C#?
- How to copy a row of values from a 2D array into a 1D array?