如下
type
IMyIntf = interface
['{}']
procedure DoSomething;
end;
TMyObj = class(TInterfacedObject, IMyIntf)
procedure DoSomething;
end;
procedure TMyObj.DoSomething;
begin
end; function CheckType(intf : IMyIntf):boolean;
begin
//这里如何检测intf是否是TMyObject或其子类的对象?
end;
type
IMyIntf = interface
['{}']
procedure DoSomething;
end;
TMyObj = class(TInterfacedObject, IMyIntf)
procedure DoSomething;
end;
procedure TMyObj.DoSomething;
begin
end; function CheckType(intf : IMyIntf):boolean;
begin
//这里如何检测intf是否是TMyObject或其子类的对象?
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货