G
Guest
Hello,
I populate a hashtable with recordID's in a "For i=0 to n" loop. Some
recordID's are duplicate but for different rows (recordID is not a key field
in this scenario). I use the value of "i" in the For loop as the key in the
hashtable (which is actually the currencyManager counter).
Originally, I was using the recordID as the key and "i" as the value. So if
I user needed to go to recordID = 12345, I just retrieve the corresponding
value for that key and make currencyManager go to that value. But since I
now have duplicate RecordID's I can't use that as the key. So I switched it
around where the value of "i" is now the key and the RecordID is the value.
I experimented with the DictionaryEntry object to retrieve the key based on
a value, but I have to loop through the entire hashtable to locate the
desired DictionaryEntry. Is there a way to go to the desired row in the
Hashtable without having to loop?
Thanks,
Rich
I populate a hashtable with recordID's in a "For i=0 to n" loop. Some
recordID's are duplicate but for different rows (recordID is not a key field
in this scenario). I use the value of "i" in the For loop as the key in the
hashtable (which is actually the currencyManager counter).
Originally, I was using the recordID as the key and "i" as the value. So if
I user needed to go to recordID = 12345, I just retrieve the corresponding
value for that key and make currencyManager go to that value. But since I
now have duplicate RecordID's I can't use that as the key. So I switched it
around where the value of "i" is now the key and the RecordID is the value.
I experimented with the DictionaryEntry object to retrieve the key based on
a value, but I have to loop through the entire hashtable to locate the
desired DictionaryEntry. Is there a way to go to the desired row in the
Hashtable without having to loop?
Thanks,
Rich