ImageList::ImageCollection::Add Method (String^, Image^)

 

Adds an image with the specified key to the end of the collection.

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

public:
void Add(
	String^ key,
	Image^ image
)

Parameters

key
Type: System::String^

The name of the image.

image
Type: System.Drawing::Image^

The Image to add to the collection.

Exception Condition
ArgumentNullException

image is null.

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: