





























namespace RestExample.Model
{
#if SILVERLIGHT
using System.ComponentModel;
public class Customer : INotifyPropertyChanged
#else
public class Customer
#endif
{
private int _id;
public int ID
{
get { return _id; }
set
{
_id = value;
#if SILVERLIGHT
NotifyPropertyChanged("ID");
#endif
}
}
private string _lastName;
public string LastName
{
get { return _lastName; }
set
{
_lastName = value;
#if SILVERLIGHT
NotifyPropertyChanged("LastName");
#endif
}
}
private string _firstName;
public string FirstName
{
get { return _firstName; }
set
{
_firstName = value;
#if SILVERLIGHT
NotifyPropertyChanged("FirstName");
#endif
}
}
private decimal _balance;
public decimal Balance
{
get { return _balance; }
set
{
_balance = value;
#if SILVERLIGHT
NotifyPropertyChanged("Balance");
#endif
}
}
#if SILVERLIGHT
public event PropertyChangedEventHandler PropertyChanged;
protected void NotifyPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
PropertyChanged(this,
new PropertyChangedEventArgs(propertyName));
}
#endif
}
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。