Skip to content

Instantly share code, notes, and snippets.

@mafis
Created May 27, 2014 06:46
Show Gist options
  • Save mafis/0f0396ec03ec6c5e268e to your computer and use it in GitHub Desktop.
Save mafis/0f0396ec03ec6c5e268e to your computer and use it in GitHub Desktop.
public class Auto : INotifyPropertyChanged
{
private int _name;
public int Name
{
get { return _name; }
set
{
if (value == _name) return;
_name = value;
OnPropertyChanged("Name");
}
}
public event PropertyChangedEventHandler PropertyChanged;
[NotifyPropertyChangedInvocator]
protected virtual void OnPropertyChanged(string propertyName)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
}
}
public class Auto : INotifyPropertyChanged
{
public int Name { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment