private static void RemoveFromDictionnary(MySqlDataReader ReaderRef) { if (myDico.ContainsKey(ReaderRef.GetHashCode() + 1)) { if (myDico.Count > 1) { myDico[ReaderRef.GetHashCode() + 1].Connection.Close(); myDico[ReaderRef.GetHashCode() + 1].Connection.Dispose(); myDico.Remove(ReaderRef.GetHashCode() + 1); } else { MySqlConnection tempConnectionMySQL = myDico[ReaderRef.GetHashCode() + 1].Connection; myDico.Remove(ReaderRef.GetHashCode() + 1); PaireReaderConnection maPaire = new PaireReaderConnection(null, tempConnectionMySQL); myDico.Add(0, maPaire); } } }