title: c# sorting numbers from lowest to highest
body: <p>I have 5 random numbers each in separate label and would like to sort them form lowest to highest and place them in new label.</p>
  
  <p>Example:
  Labels with random numbers from 1 - 60.</p>
  
  <pre><code>number1.Text = 42
  number2.Text = 51
  number3.Text = 12
  number4.Text = 33
  number5.Text = 26
  </code></pre>
  
  <p>I would like to place that numbers form lowest to highest each in separate label.</p>
  
  <p>Example:</p>
  
  <pre><code>sortNumber1.Text = 12
  sortNumber2.Text = 26
  sortNumber3.Text = 33
  sortNumber4.Text = 42
  sortNumber5.Text = 51
  </code></pre>
  
  <p>So far I try to place all sorted numbers in one label with this code:</p>
  
  <pre><code>private void button63_Click(object sender, EventArgs e)
  {
      var orderNumber1 = Convert.ToInt32(number1.Text);
      var orderNumber2 = Convert.ToInt32(number2.Text);
      var orderNumber3 = Convert.ToInt32(number3.Text);
      var orderNumber4 = Convert.ToInt32(number4.Text);
      var orderNumber5 = Convert.ToInt32(number5.Text);
      int[] numbers = { orderNumber1, orderNumber2, orderNumber3, orderNumber4, orderNumber5};
      Array.Sort(numbers);
  
      int i = 0;
      for (i = 0; i &lt; numbers.Length; i++)
      { 
          selected_number1.Text = (numbers[i].ToString());
      }
  }
  </code></pre>
  
  <p>But only last (highest) number was entered. If something doesn't make any sense it's because I am noob. Solution that I will understand would be great. Thank you. </p>