V
vector
I'd like to use something similar to the FileSystemWatcher to monitor
changes to objects in my own code. Something I can hook bitmaps,
strings, anything to, and have it raise an event when the object is
changed, possibly passing along the new hashcode for the object.
I guess it would be possible to write something like that that checks
the hashcode of an event at a specified interval, but that's a nasty
hack. Isn't there a more elegant way to accomplish this?
I envision something like this:
string myString=null;
objectWatcher.AddWatch(myString);
myString="Hello, world!"; //objWatcher would raise an event here
changes to objects in my own code. Something I can hook bitmaps,
strings, anything to, and have it raise an event when the object is
changed, possibly passing along the new hashcode for the object.
I guess it would be possible to write something like that that checks
the hashcode of an event at a specified interval, but that's a nasty
hack. Isn't there a more elegant way to accomplish this?
I envision something like this:
string myString=null;
objectWatcher.AddWatch(myString);
myString="Hello, world!"; //objWatcher would raise an event here