Condividi tramite


ITypeReflector.Instantiate Method (ITypeDescriptor, Int32, IMethodInstance)

Instantiates a collection that corresponds to the specified TypeDescriptor using default values defined for the specified MethodInstance.

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

Syntax

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

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

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