ToolStripItemCollection.ContainsKey(String) 方法

定義

判斷集合是否包含具有指定索引鍵的項目。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

要在 ToolStripItemCollection 中尋找的索引鍵。The key to locate in the ToolStripItemCollection.

傳回

Boolean

如果 ToolStripItemCollection 包含具有指定索引鍵的 ToolStripItem,則為 true,否則為 falsetrue if the ToolStripItemCollection contains a ToolStripItem with the specified key; otherwise, false.

備註

key參數值會對應至 ToolStripItem.Name 屬性。The key parameter value corresponds to the ToolStripItem.Name property.

適用於