Monday, August 15, 2011

How can we find Sequence of Items in two different array (same Type) in the same order using linq query?

Public void MatchSequenceLinq()
{
var wordsA = {"Rahul","ashok","sweta"};
var wordsB = {"rahul","ashok","sweta"};
var match = wordsA.SequenceEqual(wordsB);
Console.WriteLine("The sequences match: {0}", match);
}

Output Result: True

No comments:

Post a Comment