Einzelnen Beitrag anzeigen

Benutzerbild von DP News-Robot
DP News-Robot

Registriert seit: 4. Jun 2010
14.979 Beiträge
 
#1

Casting an Interface to a Class, the efficient way

  Alt 4. Jul 2012, 14:50
Delphi 2010 added support for the “as” to cast an interface reference to its implementation class. Cast interface as class type IFoo = interface ... end; TFoo = class (TInterfacedObject, IFoo) ... end; ... var intf : IFoo; var foo : TFoo; ... intf := TFoo.Create; ... foo := intf as ...

More...
  Mit Zitat antworten Zitat