Hi All,
I am new and studying my MCSD.NET i am currently trying to create a constructor in a class that inherits from the base class, that refers to a constructor in the base class
I know that you use the mybase keyword to create the constructor but i am getting stuck with the code.
Example
Public Class Developer
'This will Inherit from Employee
Inherits Employee
Sub New(ByVal name As String, ByVal salary As Double)
'calls the constructor
MyBase.New() needs name as string and salary as double??
End Sub
End Class
Can someone help me?
Cheers
Matt
I am new and studying my MCSD.NET i am currently trying to create a constructor in a class that inherits from the base class, that refers to a constructor in the base class
I know that you use the mybase keyword to create the constructor but i am getting stuck with the code.
Example
Public Class Developer
'This will Inherit from Employee
Inherits Employee
Sub New(ByVal name As String, ByVal salary As Double)
'calls the constructor
MyBase.New() needs name as string and salary as double??
End Sub
End Class
Can someone help me?
Cheers
Matt