ToolStripItemCollection.ContainsKey(String) ToolStripItemCollection.ContainsKey(String) ToolStripItemCollection.ContainsKey(String) ToolStripItemCollection.ContainsKey(String) Method

定义

确定集合是否包含具有指定键的项。Determines whether the collection 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

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

返回

如果 ToolStripItemCollection 包含具有指定键的 ToolStripItem,则为 true;否则为 falsetrue if the ToolStripItemCollection contains a ToolStripItem with the specified key; otherwise, false.

注解

参数值与ToolStripItem.Name属性相对应。 keyThe key parameter value corresponds to the ToolStripItem.Name property.

适用于