GetVariantProp

Get variant valued property

Declaration

Source position: variants.pp line 347

  function GetVariantProp(Instance: TObject; PropInfo: PPropInfo)
                          : Variant;
  function GetVariantProp(Instance: TObject; const PropName: string)
                          : Variant;

Description

GetVariantProp returns the value of the variant-types property described by PropInfo or PropName from the Instance.

This function is used as the value for the TypInfo unit's OnGetVariantProp callback. This callback is automatically initialized with the function when the variants unit is used.

See also

Name Description
GetPropValue Return a property value as a variant
SetVariantProp Set variant valued property
TypInfo Access Run-Time Type Information (RTTI)
TypInfo.OnGetVariantProp Callback to get a variant property value.