如果我需要通过调用以下方法在我的属性中设置一些数据:
private List<string> _country = GetCountries();
public List<string> Country
{
get
{
return _country ;
}
set
{
_country = value;
OnPropertyChanged("Country");
}
}
现在如果我们使用 Fody,那么上面的私有变量将被删除,并且使用 [ImplementPropertyChanged] 将如下所示。
public List<string> Country {get;Set;}
在上面 GetCountries() 如何调用将数据设置为属性?