HHelpersGetPropertyValueWithReflection Method (PropertyInfo, Object) |
Gets the value of a property using Reflection. This method may incur considerable performance penalties.
This method only operates on properties that are defined by types inside the Terraria, ReLogic, or XNA assemblies. If the type that owns the property is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
Namespace:
com.tiberiumfusion.ttplugins.HarmonyPlugins
Assembly:
TTPlugins (in TTPlugins.dll) Version: 1.2.0.1 (1.2.0.1)
Syntaxpublic static Object GetPropertyValueWithReflection(
PropertyInfo property,
Object sourceObject
)
Public Shared Function GetPropertyValueWithReflection (
property As PropertyInfo,
sourceObject As Object
) As Object
Parameters
- property
- Type: System.ReflectionPropertyInfo
The PropertyInfo associated with the property to be read. - sourceObject
- Type: SystemObject
The object that contains the property to be read.
Return Value
Type:
ObjectThe sourceObject's value of the property.
See Also