title: Sorting Files by date
body: <p>I am using such code to compare files to sort by date..    </p>
  
  <pre><code>FileInfo f = new FileInfo(name1);
  FileInfo f1 = new FileInfo(name2);
  if (f.Exists &amp;&amp; f1.Exists)
     output = DateTime.Compare(f.LastWriteTime, f1.LastWriteTime);
  </code></pre>
  
  <p>Is there any better and faster way to sort by Date?</p>
  
  <p>At a time i can compare only 2 items...</p>
  
  <p>I could not sort by getting all files from directory.</p>