title: VB.Net Class Inherit Sub New
body: <p>I'm currently trying to convert some basics in C# class methods into VB, and I'm having some difficulties.</p>
  
  <p>Say we have two classes, <code>baseClass</code> and <code>newClass</code></p>
  
  <pre><code>Public Class baseClass
      Public Sub New(ByVal obj As Object)
         '... do something here
      End Sub
  End Class
  
  Public Class newClass
      Inherits baseClass
      Public Sub New(ByVal obj as Object)
         '... do something here
      End Sub
  end Class
  </code></pre>
  
  <p>However, whenever I tried to declear something like</p>
  
  <pre><code>dim nc as newClass(myObj)
  </code></pre>
  
  <p>I kept getting an error telling me that</p>
  
  <p><code>First statement of this 'Sub New' must be a call to 'MyBase.New' or 'MyClass.New' because base class 'baseClass' of 'newClass' does not have an accessible 'Sub New' that can be called with no arguments.</code></p>
  
  <p>When I was trying to do something like, if written in C#, like this</p>
  
  <pre><code>public partial class newClass : baseClass
  {
    public newClass(Object obj) : baseClass(obj)
    {
       // do something here
    }
  }
  </code></pre>
  
  <p>I understand that the debugger is telling me just add an empty <code>public sub new()</code> in <code>baseClass</code>, but that's not what I'm trying to do, I wanted it to invoke the other constructor, so hopefully someone can point me in the right direction, since I've been trying to find an easy conversion guide but I couldn't find any.</p>
  
  <p>Any answer is much appreciated.</p>