111,094
社区成员




public class DomainBase : INotifyPropertyChanged
{
private int _id;
public virtual int ID
{
get { return _id; }
set
{
if (value != this._id)
{
_id = value;
PropChanged("ID");
}
}
}
public virtual event PropertyChangedEventHandler PropertyChanged;
public virtual void PropChanged(string fieldName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(fieldName));
}
}
}
public class ItemValue : DomainBase
{
...
}
public class DomainBase
{
public virtual int ID { get; set; }
}
public class ItemValue : DomainBase,INotifyPropertyChanged
{
private int _id;
public override int ID
{
get { return _id; }
set
{
if (value != this._id)
{
_id = value;
PropChanged("ID");
}
}
}
public virtual event PropertyChangedEventHandler PropertyChanged;
public virtual void PropChanged(string fieldName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(fieldName));
}
}
}