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

戻り値

Int32

TreeNodeStyleCollection 内に style が見つかった場合は、最初に見つかった位置の 0 から始まるインデックス番号。それ以外の場合は -1。

注釈

このメソッドを IndexOf 使用して、オブジェクト内の指定した TreeNodeStyle オブジェクトの 0 から始まるインデックスを TreeNodeStyleCollection 決定します。 ノードがコレクション内にない場合、メソッドは -1 を返します。

注意

指定した TreeNodeStyle オブジェクトがコレクション内に複数回出現する場合は、最初に出現したオブジェクトのインデックスが返されます。

適用対象

こちらもご覧ください