开发者

C# get images from folder

I have a product with this code: 1945开发者_开发问答78

There is a folder with a lot of images, the product's main image is 194578.JPG

There are some other images for the same product that I have to show as details but the thing is, these other images I have no idea of how much I only know they have a letter after the numbers, like:

194578A.jpg
194578B.jpg
194578C.jpg

and so on, until the max o 194578Z.jpg

I have the product code, how do I get those detail images?

Thanks in advance for any help.


You can use Directory.GetFiles to find files in a directory matching a pattern:

var files = Directory.GetFiles("path/to/directory", prefix + "?.jpg");
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜