Hi everyone,
I know you can't insert duplicate keys in a SortedList, but there's no
law against duplicate _values_, and I was wondering if anyone knows of a
good way to check if value XYZ is in more than one slot? I know I can loop
through the list and check every value against all the others, but I wasn't
sure if this was the only way to go about it. SortedList does have an
"IndexOfValue" method, but it only returns the first matching value, not a
list of values or a count of how many match.
Thanks for your advice,
-Jim
Cowboy (Gregory A. Beamer) - MVP - 28 Feb 2005 23:07 GMT
If you are attempting to sort out dupes, consider creating a hashtable to go
along side the Sorted list. Pull a list of values by index and insert into
hashtable. If the hashtable already contains that key, delete the item in the
sorted list.
---
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
> Hi everyone,
>
[quoted text clipped - 9 lines]
>
> -Jim