title: Detect variable change c#
body: <p>I've been searching this for a while and I didn't found anything for my problem.</p>
  
  <p>I have a integer:</p>
  
  <pre><code>private static int kills = 0;
  </code></pre>
  
  <p>I want a function to run when that variable changes. Like, it is 0 now. If it changes to 2, I want a function like <strong>OnVarChange</strong> that will be called, and that function <strong>OnVarChange</strong> will return the amount that was changed. In this case 2-0=2, so it will return 2.</p>
  
  <p>Is this possible? How do I do it?</p>
  
  <p>Hope you understand what I just said :p</p>