TreeNodeCollection.IList.Contains Method (Object)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

This API supports the product infrastructure and is not intended to be used directly from your code.

Determines whether the specified tree node is a member of the collection.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

bool IList.Contains(
	object node
)

Parameters

node
Type: System.Object

The object to find in the collection.

Return Value

Type: System.Boolean

true if node is a member of the collection; otherwise, false.

If node is not a TreeNode, the IList.Contains method returns false. Therefore, you cannot pass in a string to determine if the collection contains a node that has the value of the string as its Text property.

.NET Framework
Available since 1.1
Return to top
Show: