Share via


DataSourceCollection.IndexOf Method (String)

Gets the index of a DataSource with the specified identifier.

Namespace:  Microsoft.AnalysisServices
Assembly:  Microsoft.AnalysisServices (in Microsoft.AnalysisServices.dll)

Syntax

'Declaration
Public Function IndexOf ( _
    id As String _
) As Integer
'Usage
Dim instance As DataSourceCollection
Dim id As String
Dim returnValue As Integer

returnValue = instance.IndexOf(id)
public int IndexOf(
    string id
)
public:
int IndexOf(
    String^ id
)
member IndexOf : 
        id:string -> int 
public function IndexOf(
    id : String
) : int

Parameters

Return Value

Type: System.Int32
The zero-based index of the DataSource specified by id if the object is found; otherwise, -1.