Redigera

Dela via


TreeNodeBindingCollection.IndexOf(TreeNodeBinding) Method

Definition

Determines the index of the specified TreeNodeBinding object in the collection.

public:
 int IndexOf(System::Web::UI::WebControls::TreeNodeBinding ^ binding);
public int IndexOf (System.Web.UI.WebControls.TreeNodeBinding binding);
member this.IndexOf : System.Web.UI.WebControls.TreeNodeBinding -> int
Public Function IndexOf (binding As TreeNodeBinding) As Integer

Parameters

binding
TreeNodeBinding

The TreeNodeBinding to locate.

Returns

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

Remarks

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

Note

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

Applies to

See also