GetItemByIndex Method

[VB]

Public Sub GetItemByIndex(ByVal index As Integer, ByRef issuer As String, ByRef code As String)

[C#]

public void GetItemByIndex(System.Int32 index, System.String issuer, System.String code)

 

Description

The GetItemByIndex method gets an identifier from the IdentifierCollection by the index of the identifier in the collection.  The method takes three arguments, an integer that indicates the index of the desired identifier, and two strings, passed by reference, that will hold the corresponding identifier, if it exists.  If there is not an identifier at the specified index, a GeoCalcException will be thrown.

 

Example

[VB]

Private Sub GeoCalcNET_IdentifierCollection_GetItemByIndex(ByVal idc As GeoCalcNET.IdentifierCollection)

For i As Integer = 0 To idc.Count - 1

Dim issuer As String

Dim code As String

idc.GetItemByIndex(i, issuer, code)

Next

End Sub

 

[C#]

private void GeoCalcNET_IdentifierCollection_GetItemByIndex(GeoCalcNET.IdentifierCollection idc)

{

for(int i = 0; i < idc.Count; i++)

{

String issuer = "";

String code = "";

idc.GetItemByIndex(i, ref issuer, ref code);

}

}