getting filename of OpenFileDialog

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi

the property OpenFileDialog.FileName returns the path and the filename of
the selected file. how do i get only the filename (without the path in front)?

best regards

georg
 
Hello georg,
the property OpenFileDialog.FileName returns the path and the filename
of the selected file. how do i get only the filename (without the
path in front)?

Use the static methods on the System.IO.Path class on the filename.

Kind Regards,
Micael Baerens ([email protected])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top