>>From your code it looks as if the collection is actually a Dictionary of arrays.
>>But if that's the case I don't understand the "oInnerJoin.Add(loObject, lnKey, 1)" line - I'd expect
>>oInnerJoin.Add(lnKey,loObject);
>
>The key is the second parameter, not the first one.
But if oInnerJoin is
Dictionary<Tkey,TValue>
then the syntax for adding would be as my code above. That's why I didn't/don't understand your code :-{
>
>>IAC I would look in the collection and, if the key already exists then just modify the value. Only add it if is not already present.
>
>Yes, in this case, as it is an object, I can simply update the object as is, once I get a reference to it from the .Item() method.
So just? :
If loInnerJoin.ContainsKey(key) Then
loInnerJoin(key) = value
Else
loInnerJoin.Add(key, value)
End If