开发者

Search string to find Filename

I'm looking for a way in C# to search a string for the file and it's extension. So for example if I have a string "//houtestserver/common/file开发者_如何学运维1.pdf" how can I set another string to file1.pdf?

Thanks everyone in advance


System.IO.Path.GetFileName("//houtestserver/common/file1.pdf"); will return "file1.pdf". Is that enough for your needs?


string filename = Path.GetFileName(path);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜