June 26th, 2001, 06:51 PM
When adding to a Dictionary (object), how do you check for duplicate keys?
Thanks for any help . . .
June 26th, 2001, 10:57 PM
Re: When adding to a Dictionary (object), how do you check for duplicate keys?
There is an Exists method for the Dictionary object that is used to see if a specified key exists. If you try adding a key that already exists, you'll get an error.
set d = new Dictionary
if d.Exists("a") then
msgbox "already exists!"
d.Add "a", "Athens"
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.