I was just wondering, is there some way to synchronize the modification of objects that are in dictionaries (or any other IEnumerable interface for that matter), if they are modified without referring to the dictionary
I find that this code snippet doesnt work (I might be too naive):
foobar bar = new foobar();
bar.setText("hollathere");
Dictionary <string, foobar> someDict = new Dictionary<string, foobar>();
someDict.Add("handle", bar);
Now if I modify bar directly, without going through the dictionary, the changes aren't reflected in the dictionary. Same is the case the other way round.
bar.setText("blahblahblah");
and executing
someDict["handle"].getText();
would return "hollathere" whereas I want it to return "blahblahblah". Ok I know it might sound stupid and you'd think that this kills the whole purpose of the dictionary, but still...
Anyone helping me with it

Dictionaries and the objects they contain!
SkyMike99
Imran.
mok
Imran.
Patrick Sears