ImageList::ImageCollection::Add Method (String^, Image^)
.NET Framework (current version)
Adds an image with the specified key to the end of the collection.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
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
Available since 2.0
Show: