ITypeReflector.GetCollectionSize Method
Gets the number of items in the specified collection.
Namespace: Microsoft.BusinessData.Infrastructure
Assembly: Microsoft.BusinessData (in Microsoft.BusinessData.dll)
Syntax
'Declaration
Function GetCollectionSize ( _
collectionTypeDescriptor As ITypeDescriptor, _
instance As Object _
) As Integer
'Usage
Dim instance As ITypeReflector
Dim collectionTypeDescriptor As ITypeDescriptor
Dim instance As Object
Dim returnValue As Integer
returnValue = instance.GetCollectionSize(collectionTypeDescriptor, _
instance)
int GetCollectionSize(
ITypeDescriptor collectionTypeDescriptor,
Object instance
)
Parameters
collectionTypeDescriptor
Type: Microsoft.BusinessData.MetadataModel.ITypeDescriptorThe TypeDescriptor that represents the specified collection.
instance
Type: System.ObjectThe collection.
Return Value
Type: System.Int32
The number of items in the 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.