Click or drag to resize

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)
Syntax
public static Object GetPropertyValueWithReflection(
	PropertyInfo property,
	Object sourceObject
)

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: Object
The sourceObject's value of the property.
See Also