Skip to content

Instantly share code, notes, and snippets.

@runceel
Created June 21, 2019 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save runceel/aec390766555f3374bf5710eccb0da33 to your computer and use it in GitHub Desktop.
Save runceel/aec390766555f3374bf5710eccb0da33 to your computer and use it in GitHub Desktop.
public class SomeViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
private string _message;
public string Message
{
get { return _message; }
set
{
if (_message == value) { return; }
_message = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Message));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment