471,350 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

Notification whenever property is modified

mra
I want to receive a notification (via an event), whenever a property is
modified.
Of course, this would be possible if i write code such as the following to
EACH "set" part of each property:
if(Modified != null) Modified(this, EventArgs.Empty); //Modified is an event

Yet, this is annoying. How could I avoid this code duplication? Do
attributes help here somehow?

Jul 21 '05 #1
0 727

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Rob Meade | last post: by
2 posts views Thread by Richard | last post: by
5 posts views Thread by Dan Iregren | last post: by
ashitpro
1 post views Thread by ashitpro | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.