Compare two Sequences Number in Linq

Ranjeet_8
Posted by Ranjeet_8 under LINQ category on | Points: 40 | Views : 1164

var number1 = new[] { 1, 3, 5, 6, 7, 8 };
var number2 = new[] { 1, 6, 7, 8 };
var CompareResult = number1.SequenceEqual(number2);
Console.WriteLine("Sequences Equal Result is : {0}", CompareResult );

The output will be : " Sequences Equal Result is : False "

Comments or Responses

Login to post response