ImageList.ImageCollection.IList.Item Property (Int32)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

This API supports the product infrastructure and is not intended to be used directly from your code.

Gets or sets an image in an existing ImageList.ImageCollection.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

object IList.this[
	int index
] { get; set; }

Parameters

index
Type: System.Int32

The zero-based index of the image to get or set.

Property Value

Type: System.Object

The image in the list specified by the index.

Exception Condition
ArgumentOutOfRangeException

The index is less than 0 or greater than or equal to Count.

Exception

The attempt to replace the image failed.

ArgumentNullException

The image to be assigned is null or not a bitmap.

.NET Framework
Available since 2.0
Return to top
Show: