title: find most recent file in directory
body: <p>I'm trying to load the most recent file from a directory, but my following code doesn't work. Am i getting something obvious terribly wrong?!</p>
  
  <pre><code>Dim myFile = Directory.GetFiles("C:\Users\Joe\Desktop\XML Logs").OrderByDescending(Function(f) f.LastWriteTime).First()
  </code></pre>
  
  <p>I get two error messages:</p>
  
  <blockquote>
    <p>Data type(s) of the type parameter(s) in extension method '<code>Public Function OrderByDescending(Of TKey)(keySelector As System.Func(Of String, TKey)) As System.Linq.IOrderedEnumerable(Of String)</code>' defined in '<code>System.Linq.Enumerable</code>' cannot be inferred from these arguments. Specifying the data type(s) explicitly might correct this error.</p>
  </blockquote>
  
  <p>And:</p>
  
  <blockquote>
    <p>'<code>LastWriteTime</code>' is not a member of '<code>String</code>'.</p>
  </blockquote>