title: Get Maximum Value from multiple rows of multiple columns using LINQ?
body: <p>I'm using <code>LINQPad</code> to evaluate my linq query. My query goes like this:<br></p>
  
  <pre><code>from o in MyTableFirst
  join p in MyTableSecond on o.TheName equals p.TheName
  where p.TheName == "CBA-123" &amp;&amp; !p.Removed &amp;&amp; 
     (o.ReturnPeriod ==100 || o.ReturnPeriod ==10)
  select new {
     HMax1 = o.MaxValue1,
     HMax2 = o.MaxValue2,
     HMax3 = o.MaxValue3
  }
  </code></pre>
  
  <p><br>
  This query can return 0 or some number of rows.
  <br><br>
  In LINQPad, it return me something like this:
  <br></p>
  
  <p><strong>HMax1</strong>&nbsp;&nbsp;&nbsp;<strong>HMax2</strong>&nbsp;&nbsp;&nbsp;<strong>HMax3</strong><br>
  21.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>null</em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;22.5<br>
  <em>null</em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;24.6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;11.5<br>
  <br>
  Now, how am I going to get the Maximum value out for these return rows &amp; columns?<br>
  I'm expecting return of <strong>24.6</strong>.<br><br>Thank You</p>