TreeNodeCollection.IList.Contains(Object) 方法

定義

判斷指定的樹狀節點是否為集合的成員。

 virtual bool System.Collections.IList.Contains(System::Object ^ node) = System::Collections::IList::Contains;
bool IList.Contains (object node);
bool IList.Contains (object? node);
abstract member System.Collections.IList.Contains : obj -> bool
override this.System.Collections.IList.Contains : obj -> bool
Function Contains (node As Object) As Boolean Implements IList.Contains

參數

node
Object

要在集合中尋找的物件。

傳回

如果 node 是集合的成員則為 true,否則為 false

實作

備註

如果 node 不是 TreeNode ,則 IList.Contains 方法會傳 false 回 。 因此,您無法傳入字串,以判斷集合是否包含具有字串值做為其 Text 屬性的節點。

適用於