using System.Collections.Generic;
using System.Collections.ObjectModel;
private ObservableCollection<string> deviceList = new();
public static void Main()
var program = new Program();
private void Initialize()
var devices = new List<string>() { "A", "B", "C" };
var adding = devices.Where(e => !deviceList.Contains(e));
var removing = deviceList.Where(e => !devices.Contains(e));
foreach (var device in adding)
foreach (var device in removing)
deviceList.Remove(device);