Util.GetReflectedValue Method
Returns the value of a field or a property from 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 Function GetReflectedValue ( _
fieldOrProperty As MemberInfo, _
instance As Object, _
parentTypeForFieldOrProperty As ITypeDescriptor _
) As Object
'Usage
Dim fieldOrProperty As MemberInfo
Dim instance As Object
Dim parentTypeForFieldOrProperty As ITypeDescriptor
Dim returnValue As Object
returnValue = Util.GetReflectedValue(fieldOrProperty, _
instance, parentTypeForFieldOrProperty)
[CLSCompliantAttribute(false)]
public static Object GetReflectedValue(
MemberInfo fieldOrProperty,
Object instance,
ITypeDescriptor parentTypeForFieldOrProperty
)
Parameters
fieldOrProperty
Type: System.Reflection.MemberInfoThe field or property from which to obtain the value.
instance
Type: System.ObjectThe object that contains the value.
parentTypeForFieldOrProperty
Type: Microsoft.BusinessData.MetadataModel.ITypeDescriptorA type descriptor that represents the instance object.
Return Value
Type: System.Object
The value of the specified field or property from the given object.