¿Cuál es la diferencia entre raisepropertychanged y PropertyChanged?
Creo que ambos son iguales, pero encontré el uso de ellos en un solo archivo, como el código de abajo. El código de raisepropertychanged.
public decimal Amount
{
get
{
return _amount;
}
set
{
_amount = value;
RaisePropertyChanged("Amount");
}
}
Aquí el código para PropertyChanged:
public event PropertyChangedEventHandler PropertyChanged;
private void RaisePropertyChanged(string propertyName)
{
// take a copy to prevent thread issues
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
Por favor explique la diferencia entre ellos: