Hello everybody

Hello everybody,
i'm trying out interfaces. I want to declare an interface with a method that gets a parameter with a dynamic data typ.
The follwoing does not compile because interface-methods can't have parametric methods. But it illustratrats what i want.

Type
IMyInterface = interface
Procedure myMethode(var Data : T);
End;
End.

Is there an other way to do it?
Thanks to everyone!

Comments

  1. Jeroen Wiert Pluimers
    You were almost there.
    That one works:

    Type
    IMyInterface = interface
    Procedure myMethode(var Data : T);
    End;

    ReplyDelete
  2. Untyped argument to the rescue?

    type
      IMyInterface = interface
        procedure myMethode(var Data);
      end;

    See: http://pages.cs.wisc.edu/~rkennedy/untyped

    ReplyDelete
  3. Stefan Glienke thank you. I will try this

    ReplyDelete

Post a Comment