title: How to get only filenames within a directory using c#?
body: <p>When I use the line of code as below , I get an string array containing the entire path of the individual files . </p>
  
  <pre><code>private string[] pdfFiles = Directory.GetFiles("C:\\Documents", "*.pdf");
  </code></pre>
  
  <p>I would like to know if there is a way to only retrieve the file names in the strings rather than the entire paths.</p>