public void ListInt_Remove() { var list = new ListInt(new[] { 1, 2 }); list.Remove(1); list.Remove(2); Assert.Equal(0, list.Count); }
private void DisconnectClient(int ClientId) { foreach (List <int> ListInt in DictUserListener.Values) { ListInt.Remove(ClientId); } string EventName = string.Empty; foreach (KeyValuePair <string, int> kvp in DictActionListener) { if (kvp.Value == ClientId) { EventName = kvp.Key; break; } } if (EventName.Length > 0) { DictActionListener.Remove(EventName); } foreach (List <int> ListInt in DictUserClient.Values) { if (ListInt.Remove(ClientId)) { break; } } }