title: Round to 1 decimal place in C#
body: <p>I would like to round my answer 1 decimal place. for example: 6.7, 7.3, etc.
  But when I use Math.round, the answer always come up with no decimal places. For example: 6, 7</p>
  
  <p>Here is the code that I used:</p>
  
  <pre><code>int [] nbOfNumber = new int[ratingListBox.Items.Count];
  int sumInt = 0;
  double averagesDoubles;
  
  for (int g = 0; g &lt; nbOfNumber.Length; g++)
  {
      nbOfNumber[g] = int.Parse(ratingListBox.Items[g].Text);
  }
  
  for (int h = 0; h &lt; nbOfNumber.Length; h++)
  {
      sumInt += nbOfNumber[h];
  }
  
  averagesDoubles = (sumInt / ratingListBox.Items.Count);
  averagesDoubles = Math.Round(averagesDoubles, 2);
  averageRatingTextBox.Text = averagesDoubles.ToString();
  </code></pre>