title: (C#) How can I take numbers from my random number generator and output the highest and lowest number in a message box?
body: <p>I have a random number generator and for an assignment we have to take the random numbers and make outputs in a messagebox of the highest and lowest number.  I think I need to use if/else somehow but am kind of confused.  My code as of now looks like:  </p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          Random random = new Random();
          int randomNumber;
          for (int i = 0; i &lt; 11; i++)
          {
              randomNumber = random.Next(1000);
              Console.WriteLine(randomNumber);
          }         
      }
  }
  </code></pre>