HHelpersSetPropertyValueWithReflection Method (PropertyInfo, Object, Object) |
Sets 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 void SetPropertyValueWithReflection(
PropertyInfo property,
Object sourceObject,
Object newPropertyValue
)
Public Shared Sub SetPropertyValueWithReflection (
property As PropertyInfo,
sourceObject As Object,
newPropertyValue As Object
)
Parameters
- property
- Type: System.ReflectionPropertyInfo
The PropertyInfo associated with the property to set. - sourceObject
- Type: SystemObject
The object that contains the property to set. - newPropertyValue
- Type: SystemObject
The new value which will be assigned to the property.
See Also