为什么不保存到ImageList.Images [i] .Tag? [英] Why not save to ImageList.Images[i].Tag?
问题描述
在ImageList1 = new ImageList();
//错误运行时间:InvalidArgument =值'0'对'index'无效。参数名称:index
ImageList1.Images [i] .Tag =" 10" ;; //运行此行时出错。
$
ImageList1.Images.Add(key,Image);
$
为什么不保存到标签中?
我想从你所写的内容中你试图使用键"0"添加更多次图像。
请注意,标记不是索引,它只是可以添加到图像的额外数据。
成功
林前
In ImageList1 = new ImageList ();
// Error running time: InvalidArgument = Value of '0' is not valid for 'index'. Parameter name: index
ImageList1.Images [i] .Tag = "10"; // error when running time this line.
ImageList1.Images.Add (key, Image);
Why not save into tag ?
I guess from what you have written that you try to add more times an image with the key "0".
Be aware that a Tag is not an index, it is just an extra piece of data which you can add to an image.
Success
Cor
这篇关于为什么不保存到ImageList.Images [i] .Tag?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!