TreeNodeCollection.IList.IndexOf(Object) 方法     
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回集合中指定树节点的索引。
 virtual int System.Collections.IList.IndexOf(System::Object ^ node) = System::Collections::IList::IndexOf;
	int IList.IndexOf(object node);
	int IList.IndexOf(object? node);
	abstract member System.Collections.IList.IndexOf : obj -> int
override this.System.Collections.IList.IndexOf : obj -> int
	Function IndexOf (node As Object) As Integer Implements IList.IndexOf
	参数
返回
树节点集合中项的从零开始的索引;否则为 -1。
实现
注解
如果 node 不是 , TreeNode则 IList.IndexOf 该方法返回 -1。 因此,不能传入字符串来查找具有字符串值作为其 Text 属性的节点。