Skip to content

Commit

Permalink
Set new property value before raising event (#27527)
Browse files Browse the repository at this point in the history
Fixes #27501
  • Loading branch information
BillWagner authored Dec 14, 2021
1 parent 4ae67f8 commit a6cf9c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/snippets/csharp/properties/Person.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ public string FirstName
throw new ArgumentException("First name must not be blank");
if (value != firstName)
{
firstName = value;
PropertyChanged?.Invoke(this,
new PropertyChangedEventArgs(nameof(FirstName)));
}
firstName = value;
}
}
private string firstName;
Expand Down

0 comments on commit a6cf9c7

Please sign in to comment.