-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,當修改列表時會引發一個事件。 –