Originally posted by Edneeis
Yeah you can't have overloaded functions that differ only in return type. Then it can't figure out which one you are trying to call. This is a good example of when to use ByRef on a Sub instead. Nevermind I noticed you are using a property. I think its best to return object. To see intellisence for the returned object just cast it to the strong type that it actually is.
VB Code:
  1. Dim crdA As clsCardA=CType(clsMngr.Item(1),clsCardA)
The alternative is to have all cards be derived from a base class or implement the same card interface. Then return the base class/interface from the property and cast from that.
Thanks for the prompt reply. if I have implemented interface then the codes in the interface will be very long. The same goes to base class. The cards are similar in certain area only. Most of them are different when it comes to methods.