## Pascal samples. Class reference types.

>     uses
>       Classes;
>     var
>       X: TCollectionItemClass;
>       Z: TCollectionItem;
>       Y: TCollection;
>       C: TClass;
>     begin
>       X := TCollectionItem;
>       writeln(X.ClassName);
>       Y := TCollection.Create(X);
>       writeln(Y.ClassName);
>       Z := TCollectionItem.Create(Y);
>       writeln(Z.ClassName);
>       Z := X.Create(Y);
>       writeln(Z.ClassName);
>       C := Z.ClassType;
>       writeln(C.ClassName);
>       writeln(nil = Z);
>       writeln(X = TCollectionItem);
>     end.

Copyright © 2006-2008 VIRT Laboratory. All rights reserved.