Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB.NET equivalent Syntax

VB.NET equivalent Syntax

Scheduled Pinned Locked Moved Visual Basic
csharpoopquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bora3ee
    wrote on last edited by
    #1

    when i'm using inheritance... how can i call the base class constructor from the derived class... in C# i can call it by using :base(...,...) what's the equivalent syntax in VB.NET... thax in advance

    M 1 Reply Last reply
    0
    • B bora3ee

      when i'm using inheritance... how can i call the base class constructor from the derived class... in C# i can call it by using :base(...,...) what's the equivalent syntax in VB.NET... thax in advance

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      Use the MyBase keyword - the base constructor will be the New sub:

      Class MyClass
      Inherits SomeOtherClass

      Sub New()
        MyBase.New()
        ...
      End Sub
      

      End Class

      B 1 Reply Last reply
      0
      • M Mike Ellison

        Use the MyBase keyword - the base constructor will be the New sub:

        Class MyClass
        Inherits SomeOtherClass

        Sub New()
          MyBase.New()
          ...
        End Sub
        

        End Class

        B Offline
        B Offline
        bora3ee
        wrote on last edited by
        #3

        it works thanks....

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups