ImageList::ImageCollection::SetKeyName Method (Int32, String^)

 

Sets the key for an image in the collection.

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

public:
void SetKeyName(
	int index,
	String^ name
)

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