System.Web.UI.WebControls.TreeNodeBindingCollection.IndexOf Method

Determines the index of the specified System.Web.UI.WebControls.TreeNodeBinding object in the collection.

Syntax

public int IndexOf (TreeNodeBinding binding)

Parameters

binding
The System.Web.UI.WebControls.TreeNodeBinding to locate.

Returns

The zero-based index of the first occurrence of binding within the System.Web.UI.WebControls.TreeNodeBindingCollection, if found; otherwise, -1.

Remarks

Use the TreeNodeBindingCollection.IndexOf(TreeNodeBinding) method to determine the zero-based index of the specified System.Web.UI.WebControls.TreeNodeBinding object in the System.Web.UI.WebControls.TreeNodeBindingCollection object. If the node is not in the collection, the method returns -1.

Note:

If the specified System.Web.UI.WebControls.TreeNodeBinding object appears multiple times in the collection, the index of the first occurrence is returned.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0