ImageList::ImageCollection::SetKeyName Method (Int32, String^)
.NET Framework (current version)
Sets the key for an image in the collection.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- index
-
Type:
System::Int32
The zero-based index of an image in the collection.
- name
-
Type:
System::String^
The name of the image to be set as the image key.
| Exception | Condition |
|---|---|
| IndexOutOfRangeException | The specified index is less than 0 or greater than or equal to Count. |
The name of an image corresponds to its key in the ImageList::ImageCollection. An image key is not case-sensitive.
.NET Framework
Available since 2.0
Available since 2.0
Show: