Capture Min() And Max() Of Numbers Input I have two text boxes where a user inputs a start and a end, that is how it is supposed to work at least.  Rather than throwing an error if end &lt; start, I was thinking I could use the built in functions Min() &amp; Max() to capture which value is actually which.

Is this the most efficient way of capturing the Min() &amp; Max() value of text box input?

int start = Math.Min(Convert.ToInt32(txtStart.Text), Convert.ToInt32(txtEnd.Text));
int end = Math.Max(Convert.ToInt32(txtStart.Text), Convert.ToInt32(txtEnd.Text));
not going to be much better than what you have
only parse once and only compare once  

int min = Convert.ToInt32(txtStart.Text);
int max = Convert.ToInt32(txtEnd.Text);
if(max &lt; min)
{
   int temp = min;
   min = max;
   max = temp;
}