语言

TreeNodeStyleCollection.IndexOf(TreeNodeStyle) 方法

定义

确定集合中指定 TreeNodeStyle 对象的索引。

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

参数

style
TreeNodeStyle

要 TreeNodeStyle 查找的。

返回

如果找到,则为第一个匹配项 style 的 TreeNodeStyleCollection从零开始的索引;否则为 -1。

注解

IndexOf使用该方法确定对象中TreeNodeStyle指定TreeNodeStyleCollection对象的从零开始的索引。 如果节点不在集合中,该方法将返回 -1。

注释

如果集合中多次出现指定的 TreeNodeStyle 对象,则返回第一个匹配项的索引。

适用于

另请参阅