语言

ImageList.ImageCollection.ContainsKey(String) 方法

定义

确定集合是否包含具有指定键的图像。

public:
 bool ContainsKey(System::String ^ key);
public bool ContainsKey(string key);
member this.ContainsKey : string -> bool
Public Function ContainsKey (key As String) As Boolean

参数

key
String

要搜索的图像的键。

返回

true 如果指示集合中包含具有指定键的图像,则为 ;否则,为 false.

注解

图像的名称对应于其键。 关键比较不区分大小写。 key如果参数为null空字符串或空字符串,则ContainsKey该方法返回 false。

适用于