Displaying multiple error messages in a single message box
<p>I'm currently developing a desktop application with a product maintenance page and im looking for a way to display all validation errors in a single message box.</p>

<p>I am displaying one message box per validation error by using the code below: (validations are bound to a save button)</p>

<pre><code>        if ((Convert.ToInt32(txtQuantity.Text)) &gt; 20000)
        {
            MessageBox.Show("Maximum quantity is 20,000!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            txtQuantity.Focus();
            return;
        }

        if ((Convert.ToInt32(txtQuantity.Text)) &lt;= (Convert.ToInt32(txtCriticalLevel.Text)))
        {
            MessageBox.Show("Quantity is lower than Critical Level.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            txtQuantity.Focus();
            return;
        }

        if (txtCriticalLevel.Text == "0")
        {
            MessageBox.Show("Please check for zero values!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            txtCriticalLevel.Focus();
            return;
        }
</code></pre>

<p>I'd like to give the users the ease of knowing all the errors at once as opposed to knowing them one by one per message box shown. </p>

<p>thanks in advance! :)</p>