title: Best way to sort an array
body: <p>Say I have an array of records which I want to sort based on one of the fields in the record. What's the best way to achieve this?</p>
  
  <pre><code>TExample = record
    SortOrder : integer;
    SomethingElse : string;
  end;
  
  var SomeVar : array of TExample;
  </code></pre>