Hello, I'm new to csharp and was wondering about something. How can I check to see if two lists share a value? For example:
As you can see, both the lists have the number 1. How can I check this in csharp, if the lists can be any length?
Code:
List<int> list1 = new List<int>(); List<int> list2 = new List<int>(); list1.Add(1); list1.Add(5); list1.Add(3); list2.Add(4); list2.Add(1); list2.Add(9); list2.Add(2);
Comment