我有一个类如下所示,当某人设置值时,我想覆盖“School,Country等”属性的设置值。 我不想更改学生类,但我需要在基类中执行此操作并将其用作通用方法。
public class Student : BaseClass
{
public String School { get; set; }
public String Country{ get; set; }
}
例如:当有人设置Student.School="Harvard"
时,我需要将其存储为Student.School="Harvard my custom value"
;
注意:基本上在基类中调用OnPropertyChanged而不是主类。