title: ListBox Numbers, getting the average of the numbers
body: <p>Here is the question to my problem:</p>
  
  <p>"Use notepad to place the following values in a text file: 86, 97, 144, 26. To simplify the problem, the values can each be placed on separate lines.  Write a C# program to retrieve the values from the text file and print the average of the values, formatted with two decimal places.</p>
  
  <p>I already have the text file show the list of the FOUR numbers in a list box titled... "lstBoxNumbers"</p>
  
  <p>I am assuming the simply way is to take the numbers that it filtered into the listbox and use a foreach loop to calculate the average. I have decided to go the way of using a button click, to display the average in a text box. This is what i have so far.</p>
  
  <pre><code>private void btnAverage_Click(object sender, EventArgs e)
  {
      //Shows Average Of Numbers From Text File
  
      decimal average;
  
      txtAverage.Text = Convert.ToString(0);
  
      foreach (string itemInList in lstBoxNumbers.Items)
      {
  
      }
  }
  </code></pre>