polymorphism
-
why cant we have two methods with same name but different arguments in an interface ? I tried it in VB and VC it is giving problems
Hi, If you want to use your object with late binding, there is no way the GetIDsOfNames method of the IDispatch will know which ID to return, if it has two methods with the same names. So the problem is that the clients like VB or ASP do not know what to do with that kind of the objects. As I heard this problem will be fixed in the new version of VB and C#. Regards, Alex Gorev, Dundas Software.
-
why cant we have two methods with same name but different arguments in an interface ? I tried it in VB and VC it is giving problems
What you're talking about is called "overloading functions." Polymorphism is a different thing entirely! Plus, you *can* have such methods if they are in an IUnknown-based (custom) interface, but you have to promise never to use it with VB... :) Brian Hart