how to create a calculating property
<p>say i have a some properties</p>

<pre><code>public int redBalls { get; set; }
public int blueBalls { get; set; }
</code></pre>

<p>I now want to have a totalBalls property which will add the two.</p>

<p>Would I do this?</p>

<pre><code>public int totalBalls { get { return redBalls + blueBalls; } }
</code></pre>

<p>I'm trying this but the result is 0</p>

<p>*edit, i've spoken to my lead developer and it's because whatever accesses totalBalls isn't notified of the changes of redBalls or blueBalls so it wont recalculate those values</p>

<p>So I have to do <code>OnPropertyChanged("total")</code></p>
