title: Sort a list of DataRow
body: <p>I have a <code>DataTable</code> that gets me <code>ID, Description, OptionID</code></p>
  
  <pre><code>ID  Description OptionID
  1   TEST        1
  2   TEST2       1
  2   TEST3       1
  3   TEST4       2
  </code></pre>
  
  <p>Then based on a criteria I select OptionID 1 and add to list in order to remove duplicates:</p>
  
  <pre><code> DataRow[] datarow = dt.Select("OptionID = 1");
   AddToList(lst, datarow);
  </code></pre>
  
  <p>Here is How I remove duplicates and and return a list of DataRow:</p>
  
  <pre><code> private static List&lt;DataRow&gt; RemoveDuplicate(List&lt;DataRow&gt; drAllOptions)
      {
          List&lt;DataRow&gt; ldr = new List&lt;DataRow&gt;();
          List&lt;int&gt; safeGuard = new List&lt;int&gt;();
          foreach (DataRow dr in drAllOptions)
          {
              if (!safeGuard.Contains(Convert.ToInt32(dr["ID"])))
              {
                  ldr.Add(dr);
                  safeGuard.Add(Convert.ToInt32(dr["ID"]));
              }
          }
  
          return ldr;
      }
  </code></pre>
  
  <p>And then assign the returned list of DataRow to <code>Repeater</code>, now I want to sort this list, tried using <code>lst.sort()</code> but I get an exception of <code>Failed to compare two elements in the array.</code> Any help would be appreciated.</p>
  
  <p>PS. Am using .NET 2.0</p>