我试图检查来自一系列图片框的2个图片框是否包含相似的图片名称。这里有任何帮助,这是我的代码的一部分
string[] ImgLocation = Directory.GetFiles("Assets\\Cards", "*.png",
SearchOption.TopDirectoryOnly);
Image[] Deck = new Image[52];
PictureBox[] Holder = new PictureBox[52];
Deck[i] = Image.FromFile(ImgLocation[i]);
Holder[i] = new PictureBox();
Holder[i].SizeMode = PictureBoxSizeMode.StretchImage;
Holder[i].Height = 130;
Holder[i].Width = 80;
this.Controls.Add(Holder[i]);
Holder[i].Name = "pb" + i.ToString();
Holder[i].Image = Deck[i];
答案 0 :(得分:0)
您是否使用了具有更好比较功能的列表(LINQ)?