如果我有任何末尾带有图像文件的 URL,例如:
http://www.google.com/image1.jpg
http://www.google.com/test/test23/image1.jpg
我想得到:
image1.jpg
在 C# 中执行此操作的最佳方法是什么?
最佳答案
string fileName = Path.GetFileName(@"http://www.google.com/test/test23/image1.jpg");
关于c# - 如何从图片url中解析出图片名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4073244/