linq EqualAll
linq EqualAll
public static void EqualAll() { 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); var wordsA1 = new string[] { "cherry", "apple", "blueberry" }; var wordsB1 = new string[] { "cherry", "apple", "blueberry" }; bool match1 = wordsA1.SequenceEqual(wordsB1); Console.WriteLine("The sequences match: {0}", match1); }Output
linq EqualAll
Reviewed by Bhaumik Patel
on
3:55 AM
Rating: