using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
namespace 数据绑定
{
class person:INotifyPropertyChanged
{
private int age;
public int Age
{
get
{
return age;
}
set
{
this.age=value;
if (PropertyChanged!=null)
{
PropertyChanged(this ,new PropertyChangedEventArgs("Age"));
}
}
}
public string Name
{
get;
set;
}
public bool Gender
{
get;
set;
}
public int Height
{
get;
set;
}
public event PropertyChangedEventHandler PropertyChanged;
}
}