To implement the
innerProc
method of the inner class, you must qualify its name with the name of the outer class.
For example
procedure TOuterClass.TInnerClass.innerProc;
begin
...
end;
To access the members of the nested type, use dotted notation as with regular class member access. For example
var
x: TOuterClass;
y: TOuterClass.TInnerClass;
begin
x := TOuterClass.Create;
x.outerProc;
...
y := TOuterClass.TInnerClass.Create;
y.innerProc;
Dostları ilə paylaş: