ImageList::ImageCollection::Add Method (String^, Icon^)
.NET Framework (current version)
Adds an icon 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 icon.
- icon
-
Type:
System.Drawing::Icon^
The Icon to add to the collection.
| Exception | Condition |
|---|---|
| ArgumentNullException | icon 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: