Tip
To preserve the changes of a mutable value type embed it into a variable of Object type and pass it to the instance parameter of this method.
public static void SetProperty(
Object? instance,
PropertyInfo property,
Object? value,
ReflectionWays way,
params Object?[]? indexParameters
)Public Shared Sub SetProperty (
instance As Object,
property As PropertyInfo,
value As Object,
way As ReflectionWays,
ParamArray indexParameters As Object()
)public:
static void SetProperty(
Object^ instance,
PropertyInfo^ property,
Object^ value,
ReflectionWays way,
... array<Object^>^ indexParameters
)static member SetProperty :
instance : Object *
property : PropertyInfo *
value : Object *
way : ReflectionWays *
indexParameters : Object[] -> unit If way is Auto, then the DynamicDelegate way will be used, except when the .NET Standard 2.0 build of the KGySoft.CoreLibraries assembly is referenced and the property is an instance member of a value type (struct), in which case the SystemReflection way will be used.