title: Math.Max vs inline if - what are the differences?
body: <p>I was working on a project today, and found myself using Math.Max in several places and inline if statements in other places.  So, I was wondering if anybody knew which is "better"... or rather, what the real differences are.</p>
  
  <p>For example, in the following, <code>c1 = c2</code>:</p>
  
  <pre><code>Random rand = new Random();
  int a = rand.next(0,10000);
  int b = rand.next(0,10000);
  
  int c1 = Math.Max(a, b);
  int c2 = a&gt;b ? a : b;
  </code></pre>
  
  <p>I'm asking specifically about C#, but I suppose the answer could be different in different languages, though I'm not sure which ones have similar concepts.</p>