ImageList.ImageCollection.Add Method (String, Icon)

 

Adds an icon 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,
	Icon icon
)

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