HHelpersGetFieldValueByReflectionAsDynamic Method |
Gets the value of a field (using Reflection) as a dynamic object. Useful in working around "type MyType is not the same type as MyType" issues that arise from Assembly location mismatches.
Namespace:
com.tiberiumfusion.ttplugins.HarmonyPlugins
Assembly:
TTPlugins (in TTPlugins.dll) Version: 1.2.0.1 (1.2.0.1)
Syntaxpublic static Object GetFieldValueByReflectionAsDynamic(
FieldInfo field,
Object instance = null
)
Public Shared Function GetFieldValueByReflectionAsDynamic (
field As FieldInfo,
Optional instance As Object = Nothing
) As Object
Parameters
- field
- Type: System.ReflectionFieldInfo
The FieldInfo to retrieve the value of. - instance (Optional)
- Type: SystemObject
The object to retrieve the field value of.
Return Value
Type:
ObjectThe value of the field, as a dynamic object.
See Also