ImageList::ImageCollection::Item Property (Int32)

 

Gets or sets an Image at the specified index within the collection.

Namespace:   System.Windows.Forms
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.

Property Value

Type: System.Drawing::Image^

The image in the list specified by index.

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
Return to top
Show: