Skip to main content
Table of Contents

TTMSFNCPersistence.CreateObject Method

Creates a new instance of the named class, verifying it descends from the given base class.

API unit family: TMSFNCPersistence Declaring type: TTMSFNCPersistence

Syntax

FMX.TMSFNCPersistence.hppPascalC++
class function CreateObject(const AClassName: string; BaseClass: TClass): TObject;
__classmethod System::TObject* __fastcall CreateObject(const System::UnicodeString AClassName, System::TClass BaseClass);

Parameters

Name Description
AClassName The class name to instantiate.
BaseClass The required base class; the result must be an instance of this class or a descendant.

Returns

A new object instance, or nil if the class was not found or does not descend from the base class.