Information générale
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Network:
Windows 2003 Server
>What is the easiest way to detect if an index is part of a collection? I have this oSearch collection. Before doing oSearch.Remove(1), I would like to verify if that key exist first.
Rob gave the answer but you *might* get by just by checking the Remove() return value. This will be false if the item was not found - but also false if the Remove() failed for some other reason (which is the possible downside)
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement