Control.ControlCollection.ContainsKey(String) Control.ControlCollection.ContainsKey(String) Control.ControlCollection.ContainsKey(String) Control.ControlCollection.ContainsKey(String) Method

定义

确定 Control.ControlCollection 是否包含具有指定键的项。Determines whether the Control.ControlCollection contains an item with the specified key.

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

参数

key
String String String String

要在 Control.ControlCollection 中定位的键。The key to locate in the Control.ControlCollection.

返回

如果 Control.ControlCollection 包含具有指定键的项,则为 true;否则为 falsetrue if the Control.ControlCollection contains an item with the specified key; otherwise, false.

注解

Control Control.ControlCollectionName 属性Control对应于中的的键。The Name property of a Control corresponds to the key for a Control in the Control.ControlCollection.

适用于