ImageList.ImageCollection.Item[] 属性    
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| Item[String] | 
						   从集合中获取具有指定键的 Image。  | 
        	
| Item[Int32] | 
						   获取或设置集合中指定索引处的 Image。  | 
        	
Item[String]
从集合中获取具有指定键的 Image。
public:
 property System::Drawing::Image ^ default[System::String ^] { System::Drawing::Image ^ get(System::String ^ key); };
	public System.Drawing.Image this[string key] { get; }
	public System.Drawing.Image? this[string key] { get; }
	member this.Item(string) : System.Drawing.Image
	Default Public ReadOnly Property Item(key As String) As Image
	参数
- key
 - String
 
要从集合中检索的图像的名称。
属性值
具有指定键的 Image。
注解
图像的名称对应于其键。ImageList.ImageCollection 关键比较不区分大小写。
如果未找到具有指定键的图像,则 Item[] 属性值为 null。
适用于
Item[Int32]
获取或设置集合中指定索引处的 Image。
public:
 property System::Drawing::Image ^ default[int] { System::Drawing::Image ^ get(int index); void set(int index, System::Drawing::Image ^ value); };
	[System.ComponentModel.Browsable(false)]
public System.Drawing.Image this[int index] { get; set; }
	[<System.ComponentModel.Browsable(false)>]
member this.Item(int) : System.Drawing.Image with get, set
	Default Public Property Item(index As Integer) As Image
	参数
- index
 - Int32
 
要获取或设置的图像的索引。
属性值
index 指定的列表中的图像。
- 属性
 
例外
索引小于 0 或大于等于 Count。
image 不是 Bitmap。
要分配的图像为 null 或者不是 Bitmap。
无法将图像添加到列表。
注解
返回的位图是原始图像的副本,应使用 Image.Dispose 该方法释放。