Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.Net OO programing question: Strange Factory Method...

Status
Not open for further replies.

bppj

Programmer
Jun 6, 2002
24
US
Is there any way for a parent class to force a shared signature on a child class?

I know that if I want an inherited class to require an implementation of an instance member, all I have to do is provide a MustInherit member. But I want a shared member to be available with its own exectution for a child class so I can insure it is available. Ideas?

I.E., I want to know that inherited classes from a certain ParentClass always have a "Shared Function Create As ParentClass" available so a factory object can create the object by calling this known signature. Unfortunately, you can't apply interface members to shared scoped members. This create method will be implemented differently for each inherited class.

ideas?

Thanks,

B.J.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top