2
public event PropertyChangedEventHandler PropertyChanged = delegate { };
INotifyPropertyChanged的一個實現我通常實現它像
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
什麼是2和什麼區別/優點/缺點建議用用?