|
-
November 22nd, 2008, 10:00 PM
#1
Handling an event for a non-control object?
Using: c# 3.0 / .NET 3.5b
Hi!
This may sound like an elementary question, but I'm fairly new to c#. =] Is is possible to raise an event when say.. a property changes for a given object?
The property can be changed directly or indirectly by the user interacting with the form. The property I'm trying to "listen to" is the .Count on a List<T> object. The user has various GUI controls to add/remove items from the list which will obviously change the count. I'm attempting to perform some action (update the list data displayed on the form) dynamically by having an event raised when List.Count changes, and then using the event handler to immediately update the displayed List.
Thanks for the help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|