Computing Average, High Score, Low Score using foreach loop
<p>I have the following code.  How would I make both one and two digit percentages work and not cause an exception?</p>

<pre><code>private void calcStats()
{
    string value;
    int value2;
    int total = 0;
    decimal adverage;
    decimal high;
    decimal low;

    lblHigh.Text = Convert.ToString(0);

    foreach (string itemInList in lstBox.Items)
    {
        value = (itemInList.Substring(50, 3));
        value2 = int.Parse(value);

        total += (value2);
    }

   adverage = total/(lstBox.Items.Count);

   lblAdverage.Text = Convert.ToString(adverage);
}
</code></pre>
