请问INotifyPropertyChanged有关问题
请教INotifyPropertyChanged问题
这段代码提示错误:“WpfApplication5.student”不实现接口成员“System.ComponentModel.INotifyPropertyChanged.PropertyChanged"
请问问题出在哪。
------解决方案--------------------
把你的第一行代码删除,然后在那个接口上点击鼠标右键,选择“实现接口”,让它自动产生那个语句。
class student : INotifyPropertyChanged {
public event PropertyChangedEventHandler PropertyChanged;
private string name;
public string Name {
get { return name; }
set { name = value; }
}
}
这段代码提示错误:“WpfApplication5.student”不实现接口成员“System.ComponentModel.INotifyPropertyChanged.PropertyChanged"
请问问题出在哪。
------解决方案--------------------
把你的第一行代码删除,然后在那个接口上点击鼠标右键,选择“实现接口”,让它自动产生那个语句。