setPropertyValue

setPropertyValue(name:  String;
                 value: Any) updating, allowBrowserExecution;

The setPropertyValue method of the Object class sets the static or dynamic property specified in the name parameter to the value specified in the value parameter.

If the property specified in the name parameter is invalid, an exception is raised.

You should not use the setPropertyValue method as a replacement for direct assignment to a property when the property name is known at compile time, as it incurs additional overhead and prevents the compiler from checking the type compatibility of the value being assigned.

You should use it only in special cases when property names are determined at run time.