1

I've encountered the next piece of code:

protected bool SetProperty<T>(ref T backingStore, T value,[CallerMemberName] string propertyName = "",  Action onChanged = null)
 {
     if (EqualityComparer<T>.Default.Equals(backingStore, value))
        return false;
           
      backingStore = value;   
      onChanged?.Invoke();   
      OnPropertyChanged(propertyName);     
                                                                        
      return true;                                           
 }

By this code, it is clear to see that every Action can call the method Invoke(). I wanted to read about this method in the documentation for Action and it's not there. I thought maybe it is in Delegate. It's not.

Where is this method?

S Itzik
  • 494
  • 3
  • 12
  • Does this answer your question? [Is using Action.Invoke considered best practice?](https://stackoverflow.com/questions/9259470/is-using-action-invoke-considered-best-practice) – Jawad Jul 16 '20 at 17:44
  • @Jawad Hi, not it isn't .It discusses Action.Invoke - whether it is good to use it or not, but doens't deal with the question "Where is it written". – S Itzik Jul 17 '20 at 10:26

0 Answers0