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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot inherit New constructor 1

Status
Not open for further replies.

dalchri

Programmer
Apr 19, 2002
608
0
0
US
I have a class that inherits from a more general class. The more general class accepts a name parameter in its constructor because the name property is read only. VB.NET tells me that I have to implement a constructor because it can't inherit it, but I don't know how to get the name property into the base class.

I know that I can just make the property read write but I want to be anal about this :). any suggestions?
 
When you create a constructor NEW (p as string) for example, when you inherit it the new class shoud contain

public sub new (p as string)
mybase.new(p)
...
...
...
end sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top