I'm storing a bunch of supposedly-unique item IDs as a key and the file locations as the value in a hash table while traversing a table. While I am running through it, I need to make sure that they key/location pair is unique or throw an error message. I have the hashtable set up and am loading the values, but am not sure what to test:
Hashtable check_for_duplicates = new HashTable();
foreach (object item in items)
{
if (check_for_duplicates.ContainsKey(item["ItemID"]) &&
//what goes here? Would be contains item["Path"] as the value for the key)
{
//throw error
}
}