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])
 
Back
Top