C# monitor property changes

  • Thread starter Thread starter Gene Vital
  • Start date Start date
G

Gene Vital

I have a need for an object to monitor another objects properties for
changes. For an example when objA.Name changes I want objB to do something.

Is there a way for objB to bind to some of the properties of objA to
monitor changes?
 
Gene Vital said:
I have a need for an object to monitor another objects properties for
changes. For an example when objA.Name changes I want objB to do something.

Is there a way for objB to bind to some of the properties of objA to
monitor changes?

Not unless the class provides an event for it - but if the class is
your own, you could provide such an event.
 
Jon said:
Not unless the class provides an event for it - but if the class is
your own, you could provide such an event.

Well that sucks!

I was looking for more dynamic behavior where I don't have access to the
source, using events would be easy.

Is anything like this planned for 2.0 ?
 
Eugene Vtial said:
Well that sucks!

I was looking for more dynamic behavior where I don't have access to the
source, using events would be easy.

Is anything like this planned for 2.0 ?

No, I don't believe so.

It's *possible* that using some debugging API you could do it, but I
wouldn't like to say...
 
Back
Top