I have a dictionary whose key is an object and whose value is an array of objects.
When I receive a new key and object to add to the dictionary if the key already exists in the dictionary then the object is to be appended to the value.
The problem I’m facing is the first time I add a key and object to the dictionary the value will be an instance of the object rather than an array of objects.
dim dict as new Dictionary
…
1st time.
dim marr(-1) as Message // New… Right?
marr.append(newMessage)
dict.Value(key) = marr
2nd time
dim marr(-1) as Message // New?
marr = dict.Value(key)
marr.append(newMessage)
//I guess I don’t need to do anything else…