## XSICollection.Item

### Description

Returns the member of the collection specified by key as an object derived from ProjectItem or as a CollectionItem if no appropriate SDK object can be found).

### C# Syntax

    // get accessor

    Object XSICollection.get_Item( Object idx );

### Parameters

Parameter | Type | Description
--- | --- | ---
Key | Integer or String | Key for identifying the item. This could be the index of the item's location in the collection or the SIObject.FullName or identifier Object Name of the object.

### Examples

#### VBScript Example

    Dim oColl			' object pointer for collection

    Dim oMember			' for getting the first member

    Dim oLight			' for getting the light

    ' Create the collection as an ActiveX object

    Set oColl = CreateObject("XSI.Collection")

    ' Add some items to it

    oColl.Add "Camera"

    oColl.Add "Light"

    ' Get a pointer to the first member of the collection

    ' (using the index as key)

    Set oMember = oColl(0)

    getInfo oMember

    ' Get a pointer to the light (using the name as key)

    Set oLight = oColl( "Light" )

    getInfo oLight

    function getInfo( in_object )

    	LogMessage in_object & " is a " & ClassName( in_object )

    end function

    '--------------------------------------------------

    ' Output of above script:

    'INFO : "Camera is a Camera"

    'INFO : "light is a Light"

### See Also

XSICollection.GetAsText