Share via


ITypeReflector.Instantiate Method (ITypeDescriptor, Int32)

Instantiates a collection that corresponds to the specified TypeDescriptor with specified capacity without using defined default values.

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

Syntax

'Declaration
Function Instantiate ( _
    collectionTypeDescriptor As ITypeDescriptor, _
    size As Integer _
) As Object
'Usage
Dim instance As ITypeReflector
Dim collectionTypeDescriptor As ITypeDescriptor
Dim size As Integer
Dim returnValue As Object

returnValue = instance.Instantiate(collectionTypeDescriptor, _
    size)
Object Instantiate(
    ITypeDescriptor collectionTypeDescriptor,
    int size
)

Parameters

  • size
    Type: System.Int32

    Initial capacity of the collection.

Return Value

Type: System.Object
The instantiated collection.

Remarks

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

Instantiate Overload

Microsoft.BusinessData.Infrastructure Namespace