title: Using System.IO.directory.getfiles
body: <p>I am using the following code to get a list of pdf's and place them in an array, I am then searching them using autocomplete extender.  Everything works fine but System.IO.directory.getfiles always returns the path of the file which I dont want. </p>
  
  <p>Any ideas.</p>
  
  <pre><code>    Public Shared Function GetCompletionList(ByVal prefixText As String, ByVal count As Integer, ByVal contextKey As String) As String()
      'Create array of movies   
      Dim files() As String = System.IO.Directory.GetFiles("c:\pdfs")
  
      ' Return matching movies   
      Return (
           From m In files
           Where m.Contains(prefixText)
           Select m).Take(count).ToArray()
  End Function
  </code></pre>