ITypeReflector.Set Method (ITypeDescriptor, ITypeDescriptor, Object, Object, Int32)
Sets the specified value at the specified index of the specified collection.
Namespace: Microsoft.BusinessData.Infrastructure
Assembly: Microsoft.BusinessData (in Microsoft.BusinessData.dll)
Syntax
'Declaration
Sub Set ( _
typeDescriptor As ITypeDescriptor, _
instanceRootTypeDescriptor As ITypeDescriptor, _
ByRef instance As Object, _
value As Object, _
index As Integer _
)
'Usage
Dim instance As ITypeReflector
Dim typeDescriptor As ITypeDescriptor
Dim instanceRootTypeDescriptor As ITypeDescriptor
Dim instance As Object
Dim value As Object
Dim index As Integer
instance.Set(typeDescriptor, instanceRootTypeDescriptor, _
instance, value, index)
void Set(
ITypeDescriptor typeDescriptor,
ITypeDescriptor instanceRootTypeDescriptor,
ref Object instance,
Object value,
int index
)
Parameters
typeDescriptor
Type: Microsoft.BusinessData.MetadataModel.ITypeDescriptorThe TypeDescriptor that represents an element in the collection.
instanceRootTypeDescriptor
Type: Microsoft.BusinessData.MetadataModel.ITypeDescriptorThe TypeDescriptor that represents the collection.
instance
Type: System.ObjectThe collection.
value
Type: System.ObjectThe value to set.
index
Type: System.Int32The index in the collection to set.
Remarks
The value could be of a primitive type, value type, or a reference type. The TypeDescriptor that represents the parent object 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.