title: Get the image file path
body: <p>HI,</p>
  
  <p>I am trying to retrive the filname of the image file from a file path in my code.</p>
  
  <p>My filepath: c:\mydocuments\pictures\image.jpg</p>
  
  <p>which method can i use in c# to get he filename of the above mentioned path.</p>
  
  <p>Like String file = image.jpg</p>
  
  <p>I have used the system.drawing to get he path, but it returns null.</p>
  
  <p>my code:</p>
  
  <pre><code>string file = System.drawing.image.fromfile(filepath,true);
  </code></pre>
  
  <p>Is this the right way to get the image file name or is there any other inbuilt method in c#.</p>
  
  <p>Pls help me on this?</p>