Util.SetReflectedValue Method
Sets the value of a field or a property on the given object by using reflection.
This API is not CLS-compliant.
Namespace: Microsoft.BusinessData.Infrastructure
Assembly: Microsoft.BusinessData (in Microsoft.BusinessData.dll)
Syntax
'Declaration
<CLSCompliantAttribute(False)> _
Public Shared Sub SetReflectedValue ( _
fieldOrProperty As MemberInfo, _
instance As Object, _
parentTypeForFieldOrProperty As ITypeDescriptor, _
value As Object _
)
'Usage
Dim fieldOrProperty As MemberInfo
Dim instance As Object
Dim parentTypeForFieldOrProperty As ITypeDescriptor
Dim value As ObjectUtil.SetReflectedValue(fieldOrProperty, _
instance, parentTypeForFieldOrProperty, _
value)
[CLSCompliantAttribute(false)]
public static void SetReflectedValue(
MemberInfo fieldOrProperty,
Object instance,
ITypeDescriptor parentTypeForFieldOrProperty,
Object value
)
Parameters
fieldOrProperty
Type: System.Reflection.MemberInfoThe field or property on which to set the value.
instance
Type: System.ObjectThe object on which to set the value.
parentTypeForFieldOrProperty
Type: Microsoft.BusinessData.MetadataModel.ITypeDescriptorThe type descriptor that represents the instance object.
value
Type: System.ObjectThe value to set.