Created
August 16, 2019 23:41
-
-
Save Sa1Gur/58449113e9eac599048cde6761f8740f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TeamMateItem : INotifyPropertyChanged | |
{ | |
public event PropertyChangedEventHandler PropertyChanged; | |
protected bool SetPropertyValue<T>(ref T field, T value, [CallerMemberName] string propertyName = null) | |
{ | |
if (Equals(field, value)) return false; | |
field = value; | |
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | |
return true; | |
} | |
private string _name; | |
public string Name | |
{ | |
get => _name; | |
set => SetPropertyValue(ref _name, value); | |
} | |
private uint _level; | |
public uint Level | |
{ | |
get => _level; | |
set => SetPropertyValue(ref _level, value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment