c# - Get file name of file from full path? -


i have dragdrop enabled in winforms application, i'm getting list of items dropped , storing them in string array called files, in dragdrop event can like:

foreach (string file in files) {     messagebox.show(file); } 

which return like:

c:\users\myname\document.txt 

is possible file name + extension (e.g. document.txt)? i'm not asking complete solution, hint me in direction?

use path static function calls such as:

path.getfilename(somefullpath); 

see msdn here.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -