public int add(ConnectionPair cp) { if (!exist(cp)) { list.Add(cp); return(0); } return(1); }
public int remove(ConnectionPair cp) { if (exist(cp)) { list.Remove(cp); return(0); } return(1); }
public bool exist(ConnectionPair cp) { return(list.Exists(x => x == cp)); }