-3
private List<Profile> _profiles = new List<Profile>();
public List<Profile> Profiles
{
get
{
return _profiles;
}
set
{
// do here something in the changed index only
}
}
这是像父类的列表属性列表中的索引, 是存在的方式来知道什么是用户改变与否的指标,因为我只需要在已更改的索引中执行某些操作。我怎么能知道列表的用户更改
我可以做的清单,属性,然后在设定的功能让我知道当用户更新数据
我想你应该说他应该尝试使用INotifyPropertyChange – devTimmy
只有当你想跟踪属性级别的变化 - 听起来像OP只真的需要CollectionChanged,当修改列表时会引发一个事件。 –