List<string> list1 = new List<string>() { "A", "B", "C", "D" };
List<string> list2 = new List<string>() { "B", "D" };
List<string> list3 = list1.Except(list2).ToList();
List<string> list2 = new List<string>() { "B", "D" };
List<string> list3 = list1.Except(list2).ToList();
Here, in the list3 object, we will get the value A & C.
No comments:
Post a Comment