語言

ImageList.ImageCollection.Item[] 屬性

定義

在現有Image的 中得到或設定 。ImageList

多載

名稱 Description
Item[String]

從集合中取得指定金鑰的 。Image

Item[Int32]

在集合中指定索引處取得或設定 a Image 。

Item[String]

來源:
ImageList.ImageCollection.cs
來源:
ImageList.ImageCollection.cs
來源:
ImageList.ImageCollection.cs
來源:
ImageList.ImageCollection.cs
來源:
ImageList.ImageCollection.cs

從集合中取得指定金鑰的 。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]

來源:
ImageList.ImageCollection.cs
來源:
ImageList.ImageCollection.cs
來源:
ImageList.ImageCollection.cs
來源:
ImageList.ImageCollection.cs
來源:
ImageList.ImageCollection.cs

在集合中指定索引處取得或設定 a 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 方法處理。

適用於