实际上无所谓类型转换,除非转换为基类(事实上并没有必要)。
type TTest = class(TMyObj) end; var xx: TTest; begin if xx is TMyObj then begin (xx as TMyObj).free; end; end;
16,748
社区成员
33,247
社区内容
加载中
试试用AI创作助手写篇文章吧