check if two elements of list are the same c# code example
Example: check two lists are equal c#
List<int> list1 = new List<int> { 1, 2, 3 };
List<int> list2 = new List<int> { 1, 2, 3 };
if (list1.SequenceEqual(list2))
{
Console.WriteLine("true");
}
else
{
Console.WriteLine("false");
}