Share via


ITypeReflector.Get Method (ITypeDescriptor, ITypeDescriptor, Object, Int32)

Gets the value at the specified index from the specified collection.

Namespace:  Microsoft.BusinessData.Infrastructure
Assembly:  Microsoft.BusinessData (in Microsoft.BusinessData.dll)

Syntax

'Declaration
Function Get ( _
    collectionTypeDescriptor As ITypeDescriptor, _
    instanceRootTypeDescriptor As ITypeDescriptor, _
    instance As Object, _
    index As Integer _
) As Object
'Usage
Dim instance As ITypeReflector
Dim collectionTypeDescriptor As ITypeDescriptor
Dim instanceRootTypeDescriptor As ITypeDescriptor
Dim instance As Object
Dim index As Integer
Dim returnValue As Object

returnValue = instance.Get(collectionTypeDescriptor, _
    instanceRootTypeDescriptor, instance, _
    index)
Object Get(
    ITypeDescriptor collectionTypeDescriptor,
    ITypeDescriptor instanceRootTypeDescriptor,
    Object instance,
    int index
)

Parameters

  • instance
    Type: System.Object

    The collection to get the value from.

  • index
    Type: System.Int32

    The index of the value in the collection.

Return Value

Type: System.Object
The value.

Remarks

The returned value can be of a primitive type, value type, or a reference type. The TypeDescriptor that represents the collection must have the IsCollection flag set.

Instances of objects in the Business Data Connectivity object model are tied to the Metadata Store they are obtained from. Using instances tied to one Metadata Store with the instances from another Metadata Store will cause data corruption and other unexpected behavior. For more information, see DatabaseBackedMetadataCatalog, FileBackedMetadataCatalog, and RemoteSharedFileBackedMetadataCatalog.

See Also

Reference

ITypeReflector Interface

ITypeReflector Members

Get Overload

Microsoft.BusinessData.Infrastructure Namespace