I've got an interface with generics which accepts classes:

I've got an interface with generics which accepts classes:

IMyGeneric = interface
.....
end;

What I want to do is to allow this interface to accept interfaced classes as well. If I write:

IMyGeneric = interface
...
end;

it means that T1 must be an interfaced object.

If I declare another interface:

IMyInterfacedGeneric = interface
...
end;

I need to develop a class identical to the class I use for the "class" constraint. Is there a nicer and easier way to do this?

Thanks

Comments

  1. Asbjørn Heid There is something wrong with that site. I follow the link above and I see two replies in the code under other names (Mature ..., Social ...). If you click on either of them you will see that they are the same and then the name changes to my name....This is very buggy site

    ReplyDelete
  2. John Kouraklis I see the replies now. Maybe due to mobile browser, who knows... anyway let me read them and I'll respond here.

    ReplyDelete
  3. Asbjørn Heid No problem. Whenever and if you can :-)

    ReplyDelete

Post a Comment