Getting just the filename from a path
i need to extract just the filename from a full path when using the saveFileDialog.
i have noticed in the openFileDialog they give the "SafeFilename" to do that job but it is not there in the saveFileDialog options.
so i guess i need to use either basic string handling or maybe stringbuilder here ?
however my string handling experience in c# is not good i would like to know how to achieve this.
if my path is
c:\users\me\test\filename.txt
how can i strip just the "filename.txt" part to save in another string ( or even just chop the exsiting string as it is not needed after this point)
thanks