共用方式為


IndexOf 方法 (String)

Returns the zero-based index of the first occurrence of an IModelComponent that has the specified key in the ModelComponentCollection.

命名空間:  Microsoft.AnalysisServices
組件:  Microsoft.AnalysisServices (在 Microsoft.AnalysisServices.dll 中)

語法

'宣告
Protected Function IndexOf ( _
    key As String _
) As Integer
'用途
Dim key As String
Dim returnValue As Integer

returnValue = Me.IndexOf(key)
protected int IndexOf(
    string key
)
protected:
int IndexOf(
    String^ key
)
member IndexOf : 
        key:string -> int 
protected function IndexOf(
    key : String
) : int

參數

傳回值

型別:System. . :: . .Int32
The zero-based index of the first occurrence of key within the ModelComponentCollection, if found; otherwise, -1.