Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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");
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #lists #equal
ADD COMMENT
Topic
Name
8+1 =