c# - When a property is changed several times very quickly, how many PropertyChanged events are sent? -


i have code implements propertychanged event (similar snippet below).

private void sendpropertychanged(string propertyname)       {          if(propertychanged != null)          {             propertychanged(this, new propertychangedeventargs(propertyname));            }       } 

i noticed event handler called once, when same property changed several times quickly. can't find documentation mentions this. can confirm if expected behaviour propertychanged?

remember c# event not more function call. there 2 main differences regular function call: -

  1. with events, callee has dependency on caller, rather other way around.

  2. the event can have invocation list, is, multiple callees can attached single caller.

there no throttling built event raising mechanism, effect you're seeing must have different explanation.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -