Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27159

VS 2012 Trying to get my head around inheritence

$
0
0
Hi,

Im trying to use inheritance but I can't seem to get it to work properly (Dosomething works but Asubname wont display)

Code:

Public Class Something
    Public Sub DoSomething()
        MsgBox("this better work")
    End Sub
End Class

Public Class Details
    Inherits Something
    Public Sub ASubName()
        MsgBox("this also better work")
    End Sub
End Class

Code:

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim AVariable As Something
        AVariable = New Something
        AVariable.DoSomething()
        AVariable.Asubname()
    End Sub
End Class


Viewing all articles
Browse latest Browse all 27159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>