- node
- The System.Windows.Forms.TreeNode to locate in the collection.
The zero-based index of the item found in the tree node collection; otherwise, -1.
The amount of time this method takes is proportional to the size of the node collection, so you may want to avoid using it with large collections.
This method checks for reference equality only. You cannot use it to retrieve the index of an equivalent but different node in the collection.
One implication of the reference-equality requirement is that you cannot customize the behavior of this method for derived System.Windows.Forms.TreeNode types by overriding the erload:System.Object.Equals method of the System.Windows.Forms.TreeNode class.