Table of Contents

IObjectFactory.CreateInstance Method

Creates a new instance of the specified class.

Syntax

Unit: Bcl.Rtti.ObjectFactory

function IObjectFactory.CreateInstance(AClass: TClass): TObject; virtual; abstract;

Parameters

<-> Parameter Type Description
AClass TClass The class reference to instantiate.

Returns

A new instance of AClass, or nil if the instance could not be created.

See also