語言

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要找到。

傳回

若在 中首次出現的 為styleTreeNodeStyleCollection零基索引;否則為 -1。

備註

使用該IndexOf方法來確定該物件中TreeNodeStyle指定TreeNodeStyleCollection物件的零基索引。 若該節點不在集合中,方法回傳 -1。

Note

若指定的 TreeNodeStyle 物件在集合中出現多次,則會回傳第一次出現的索引。

適用於

另請參閱