ImageList::ImageCollection::Item Property (Int32)
.NET Framework (current version)
Gets or sets an Image at the specified index within the collection.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: [BrowsableAttribute(false)] property Image^ default[ int index ] { Image^ get(int index); void set(int index, Image^ value); }
Parameters
- index
-
Type:
System::Int32
The index of the image to get or set.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The index is less than 0 or greater than or equal to Count. |
| ArgumentException | image is not a Bitmap. |
| ArgumentNullException | The image to be assigned is null or not a Bitmap. |
| InvalidOperationException | The image cannot be added to the list. |
The returned bitmap is a copy of the original image and should be disposed of using the Image::Dispose method.
.NET Framework
Available since 1.1
Available since 1.1
Show: