System.Rtti.TRttiProperty.SetValue
Delphi
procedure SetValue(Instance: Pointer; const AValue: TValue);
C++
void __fastcall SetValue(void * Instance, const TValue &AValue);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Rtti.pas System.Rtti.hpp |
System.Rtti | TRttiProperty |
Description
Sets the value of the field in a given instance.
Call SetValue to set a new value to the property in a given instance. SetValue requires a TValue structure that contains the new value of the property.
The AInstance parameter can either point to a class instance or to a record instance.
Note: Use the IsWritable property to check whether writing a property's value is allowed. Trying to call SetValue on a nonwritable property results in an exception.