G
Guest
VB.NET VS 2005.
I have a Form1 Base Class with one default and one overload constructor:
Sub New
InitializeComponent
End Sub
Sub New( ByVal A as Int32)
me.new
me.a = A
End Sub
Then I have a Form2 inheriting from Form1
But if i try to call:
Dim f As New Form2(A)
VS say that there are too many arguments for *Public Sub New()*
Why?
How can i inherit the constructor ?
The only way i found is to write another constructor in the derived class
like this:
Sub New(A)
Mybase.New(A)
Initializecomponent()
End Sub
I have a Form1 Base Class with one default and one overload constructor:
Sub New
InitializeComponent
End Sub
Sub New( ByVal A as Int32)
me.new
me.a = A
End Sub
Then I have a Form2 inheriting from Form1
But if i try to call:
Dim f As New Form2(A)
VS say that there are too many arguments for *Public Sub New()*
Why?
How can i inherit the constructor ?
The only way i found is to write another constructor in the derived class
like this:
Sub New(A)
Mybase.New(A)
Initializecomponent()
End Sub