![ContractedBlock.gif](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
![ExpandedBlockStart.gif](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
public
class
Student : INotifyPropertyChanged
{
private string studentID;
public string StudentID
{
get { return studentID; }
set
{
studentID = value;
NotifyPropertyChange( " StudentID " );
}
}
private string studentName;
public string StudentName
{
get { return studentName; }
set
{
studentName = value;
NotifyPropertyChange( " StudentName " );
}
}
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChange( string propertyName)
{
if (PropertyChanged != null )
{
PropertyChanged( this , new PropertyChangedEventArgs(propertyName));
}
}
{
private string studentID;
public string StudentID
{
get { return studentID; }
set
{
studentID = value;
NotifyPropertyChange( " StudentID " );
}
}
private string studentName;
public string StudentName
{
get { return studentName; }
set
{
studentName = value;
NotifyPropertyChange( " StudentName " );
}
}
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChange( string propertyName)
{
if (PropertyChanged != null )
{
PropertyChanged( this , new PropertyChangedEventArgs(propertyName));
}
}