Consider if I have a Dictionary<Key,List<item>> TestDictionary
If I do:
List<item> someCollection;
TestDictionary.TryGetValue(someKey,out someCollection); //assuming that someCollection will not return null;
someCollection.add(someItem);
Will the object someItem be added to the collection in the Dictionary value TestDictionary[someKey] ?
Yes, you will have a reference of the object if it is a Ref type, and of course a copy if it is a Value type