get waht is differnt between two arrays c#
//get whats in array 2 but not array 1
- array2.Except(array1)
//get whats in array 1 but not array 2
- array1.Except(array2)
//get what is in both array 1 and array 2
- array1.Intersect(array2)
get waht is differnt between two arrays c#
//get whats in array 2 but not array 1
- array2.Except(array1)
//get whats in array 1 but not array 2
- array1.Except(array2)
//get what is in both array 1 and array 2
- array1.Intersect(array2)
difference two list c#
var list1 = new List<int> { 1, 2, 3, 4, 5};
var list2 = new List<int> { 3, 4, 5, 6, 7 };
var list3 = list1.Except(list2); //list3 contains only 1, 2
var list4 = list2.Except(list1); //list4 contains only 6, 7
var resultList = list3.Concat(list4).ToList(); //resultList contains 1, 2, 6, 7
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us