Delphi - Generic Validation Type if Created
I have the following class definition
TBase<T> = class
public
class var Inst: T;
class function GetClone: T;
end;
And I want to check if the var Inst is assigned.
class function TBase<T>.GetClone: T;
begin
if TBase<T>.Inst = nil then //- error here. Trying with Assigned(TBase<T>.Inst) is also nor recognized.
TBase<T>.Inst := TBase<T>.Create;
end;
How can I check if my class variable is assigned?
+3
source to share