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 SetField(
Object? instance,
FieldInfo field,
Object? value,
ReflectionWays way = ReflectionWays.Auto
)
Public Shared Sub SetField (
instance As Object,
field As FieldInfo,
value As Object,
Optional way As ReflectionWays = ReflectionWays.Auto
)
public:
static void SetField(
Object^ instance,
FieldInfo^ field,
Object^ value,
ReflectionWays way = ReflectionWays::Auto
)
static member SetField :
instance : Object *
field : FieldInfo *
value : Object *
?way : ReflectionWays
(* Defaults:
let _way = defaultArg way ReflectionWays.Auto
*)
-> unit
If way is Auto, then the DynamicDelegate way will be used.