|
-
Jul 15th, 2004, 10:47 AM
#1
Thread Starter
Hyperactive Member
Inherit a class with a private "New()" sub?
Please forgive me if this is a dumb question but...
I am learing how to extend a class with some properties and methods of my own design. When I create the class code and add the Inherit statement I get this error:
Class 'PourLine' must declare a 'Sub New' because its base class 'LineClass' does not have an accessible 'Sub New' that can be called with no arguments.
When I attempt to add a sub called "New" I get this error:
First statement of this 'Sub New' must be a call to 'MyBase.New' or 'MyClass.New' because base class 'DesignCAD.LineClass' of 'Exploring_Capping_Classes.PourLine' does not have an accessible 'Sub New' that can be called with no arguments.
When I try MyBase.New() the error is:
'DesignCAD.LineClass.Private Sub New()' is not accessible in this context because it is 'Private'.
Is there any way I can create a class that inherits the methods and properties of the base class?
My simple code:
Public Class PourLine
Inherits DesignCAD.LineClass
Sub Build()
MyBase.New()
End Sub
End Class
Thanks in advance for your help.
Eric
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|