Skip to content

Instantly share code, notes, and snippets.

@vertigra
Last active September 28, 2023 05:36
Show Gist options
  • Save vertigra/0c6d569ba524c80810db3209c9b4edba to your computer and use it in GitHub Desktop.
Save vertigra/0c6d569ba524c80810db3209c9b4edba to your computer and use it in GitHub Desktop.
INotifyPropertyChanged vs INotifyPropertyChanged
INotifyPropertyChanged - рas already changed
INotifyPropertyChanged - beginning to change
For example
public int Id
{
get => _id;
set
{
PropertyChanging?.Invoke(this, new PropertyChangingEventArgs(nameof(Id)));
_id = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Id)));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment