title: Best way to call a function in the event of a variable's value is changed?
body: <p>say I have an <code>int Index = 0;</code>. This value may be changed by the user at any point of the program. When it does, I need to update all my screens to data concerned with that new index value. I have a function for this I just need help figuring out how to call it. </p>
  
  <p>My idea is to create a timer, and on every tick event it checks to see if the value of my variable <code>Index</code> has changed. If yes then execute my function. But this seems really amateur to me. There has to be something more direct correct? I heard of something called "INotifyPropertyChanged" or something like that but I'm having a hard time finding a solid example of how it works. </p>
  
  <p>Any ideas are much appreciated thank you.</p>