D
daokfella
I have a business object that exposes a collection of other objects
via a List<of Type>. How can I intercept when an item is either added
or removed from this list. Is it possible?
private List<Permission> _Permissions;
public List<Permission2> Permissions
{
get
{
if (_Permissions == null)
{
_Permissions = new List<Permission>();
}
return _Permissions;
}
}
The consumer of this can now say
myobject.Permissions.Add(newPermission). I'd like to be able to run
some code when this happens. What's the best way?
Thanks,
Jason
via a List<of Type>. How can I intercept when an item is either added
or removed from this list. Is it possible?
private List<Permission> _Permissions;
public List<Permission2> Permissions
{
get
{
if (_Permissions == null)
{
_Permissions = new List<Permission>();
}
return _Permissions;
}
}
The consumer of this can now say
myobject.Permissions.Add(newPermission). I'd like to be able to run
some code when this happens. What's the best way?
Thanks,
Jason