title: How to find max value in a column in a datarow[] ?
body: <p>I have a simple problem but I just don't understand any of the examples I find here or in MSDN. (I'm still new to C# and all the datasets functions).</p>
  
  <p>I have a datatable "tblRoom" which its columms are "building","apartment" and "room" and they're all ints and the table's primary keys (it's a weak entity of apartment (which is weak entity of building) without other properties/columns).</p>
  
  <p>I also have <code>DataRow[] roomCollection</code> that selects a specific apartment in a building with this code:</p>
  
  <pre><code>roomCollection = dbDataSet.tblRoom.Select("building ='"+ b_int + 
                                            "' and apartment='"+ a_int + "'");
  </code></pre>
  
  <p>All this runs fine (I guess...).
  Now I want to get max value of room from this apartment (the max room number in this apartment).
  I've tried to no avail these codes:</p>
  
  <pre><code>DataRow dr = roomCollection.Max();
  int maxi = roomCollection.Max();
  </code></pre>
  
  <p>I just don't get from the tooltip what am I suppose to write in the function. It throws exceptions on either no IEnumerable or Icomparable.</p>
  
  <p>What do I need to write to get the max value (int) in the room column? Anyone knows a "[something] for dummies" that explains it to an idiot because I don't understand the meaning of the errors/tooltip of what am I suppose to write in the <code>Max()</code>.</p>
  
  <p>EDIT:
  The tooltip suggest to enter these (shown relevants):</p>
  
  <pre><code>(this IEnumerable &lt;DataRow&gt; source):DataRow
  (this IEnumerable &lt;DataRow&gt; source, Func&lt;DataRow,int?&gt; selector):int?
  (this IEnumerable &lt;DataRow&gt; source, Func&lt;DataRow,int&gt; selector):int
  </code></pre>
  
  <p>I really don't get it :(</p>
  
  <p>Thanks ahead,
  Shay.</p>