EqualAll - 2

Query
public void Linq97()
{
var wordsA = new string[] { "cherry", "apple", "blueberry" };
var wordsB = new string[] { "apple", "blueberry", "cherry" };

bool match = wordsA.SequenceEqual(wordsB);

Console.WriteLine("The sequences match: {0}", match);
}
Lambda Expression
public void Linq97()
{
var wordsA = new string[] { "cherry", "apple", "blueberry" };
var wordsB = new string[] { "apple", "blueberry", "cherry" };

bool match = wordsA.SequenceEqual(wordsB);

Console.WriteLine("The sequences match: {0}", match);
}
Output
The sequences match: False
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +