RoleGroupCollection.IndexOf(RoleGroup) 方法

定義

搜尋集合,並傳回指定的 RoleGroup 中第一個符合以零起始的索引。

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

參數

group
RoleGroup

要在集合中尋找的 RoleGroup

傳回

Int32

整個 group 中第一個出現 RoleGroupCollection 之以零為起始的索引 (如有找到),否則為 -1。

備註

方法 IndexOf 會執行線性搜尋,因此平均執行時間取決於集合中的成員數目。

適用於

另請參閱