Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void MergeListsOfCameras(ref List<Camera> list1, List<Camera> list2)
- {
- foreach (Camera c2 in list2)
- {
- for (int i = 0; i < list1.Count; i++)
- {
- if (c2.Device == list1[i].Device)
- break;
- // We are at last element
- if (i - 1 == list1.Capacity)
- // Connected camera is not present in the list
- list1.Add(c2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment