METHOD
Enumerable.SequenceEqual
Tests whether corresponding elements and sequence lengths match using equality.
Formal Syntax & Structure
csharp syntaxcsharp
first.SequenceEqual(second)Working Example
Example Snippetcsharp
using System;using System.Linq;bool same = new[] {1,2}.SequenceEqual(new[] {1,2});