共用方式為


RoleCollection.IndexOf 方法

定義

多載

IndexOf(Role)

搜尋指定的 Role,並傳回其在集合中以零起始的索引。

IndexOf(String)

搜尋具有指定識別碼的 Role,並傳回其在集合中以零起始的索引。

IndexOf(Role)

搜尋指定的 Role,並傳回其在集合中以零起始的索引。

public int IndexOf (Microsoft.AnalysisServices.Tabular.Role item);
override this.IndexOf : Microsoft.AnalysisServices.Tabular.Role -> int
Public Function IndexOf (item As Role) As Integer

參數

item
Role

要在集合中尋找的 Role

傳回

如果找到,則為 Role 在集合中以零起始的索引;否則為 -1。

適用於

IndexOf(String)

搜尋具有指定識別碼的 Role,並傳回其在集合中以零起始的索引。

public int IndexOf (string id);
override this.IndexOf : string -> int
Public Function IndexOf (id As String) As Integer

參數

id
String

要在集合中找出的 Role 的識別碼。

傳回

如果找到,則為 Role 在集合中以零起始的索引;否則為 -1。

適用於