Is there any way to get a file name from a path?
For example, how can I get me.jp
from c:\\MyPic\\OldPic\\me.jpg
?
Thanks in advance.
您可以看一下Path.GetFileName方法:
string filename = Path.GetFileName(@"c:\MyPic\OldPic\me.jpg");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.