Export (0) Print
Expand All

ImageList.ImageCollection.ContainsKey Method

Determines if the collection contains an image with the specified key.

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

public bool ContainsKey(
	string key


Type: System.String

The key of the image to search for.

Return Value

Type: System.Boolean
true to indicate an image with the specified key is contained in the collection; otherwise, false.

The name of an image corresponds to its key. The key comparison is not case-sensitive. If the key parameter is null or an empty string, the ContainsKey method returns false.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft