遍历this.imageList1.Images.Keys即可。

解决方案 »

  1.   

    Name是什么东东?ImageList的每一个图片是一个Image对象,Image对象是没有Name属性的!
    但是你可用在添加的时候把你所谓的Name附加到Image的Tag属性上,然后就可以了!
      

  2.   

    //遍历代码
                for (int i = 0; i < this.imageList1.Images.Keys.Count; i++)
                {
                    MessageBox.Show(this.imageList1.Images.Keys[i].ToString());
                }            string result = this.imageList1.Images.Keys.OfType<string>().FirstOrDefault(x => x == "accept.png");//accept.png为文件名