Skip to content

Instantly share code, notes, and snippets.

@Danghor
Last active March 12, 2018 14:54
Show Gist options
  • Save Danghor/4c760ff0f3646fdb346481a90c64bb04 to your computer and use it in GitHub Desktop.
Save Danghor/4c760ff0f3646fdb346481a90c64bb04 to your computer and use it in GitHub Desktop.
Implementation of INotifyPropertyChanged
using System.ComponentModel;
using System.Runtime.CompilerServices;
abstract class PropertyChangedInformer : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment