Public Sub New() not inheriting?

  • Thread starter Thread starter Nemisis
  • Start date Start date
N

Nemisis

Hi everyone,

Can someone tell me why, if i have a Base class (classA) that have a
constructor of

Public Sub New()

End Sub

And i have a class that inherits the functionality of this class
(ClassB), why does ClassB not have the New constructor??

Do i have to explictly define this in every class that inherits ClassA??
 
If you don't define a constructor, the CLR will define one for you. All
classes MUST have a constructor. So, ClassB will be given a constructor if
you don't explictly write one yourself.
 
Back
Top