Check whether collection holds a key

  • Thread starter Thread starter ivan.svaljek
  • Start date Start date
I

ivan.svaljek

Is there a way to check whether a key has been inserted into collection
other than try-catch ?
Is there an object better suited to that end ?
 
Is there a way to check whether a key has been inserted into collection
other than try-catch ?
Is there an object better suited to that end ?

If you are using a 'Hashtable', you can use its 'ContainsKey' method for
this purpose.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top