Imports System
''' this program wontwork in this compiler any any other
''' look slowly to understand clearly
Public Class A
Public shared Name As String
Public Sub GetName()
Console.WriteLine("Name: {0}",Name)
'Console.WriteLine("Name: {0}",b.Name)
End Sub
End Class
Public Class B
Inherits A
Public Location As String
Public Sub GetLocation()
Console.WriteLine("Location: {0}", Location)
Public Class C
Public Age As Integer
Public Sub GetAge()
Console.WriteLine("Age: {0}", Age)
Class Program
Public shared Sub Main()
Dim c As C = New C()
Dim b as B = new B()
c.Name = "gokul"
c.GetName()
b.Name = "gautam"
b.GetName()
b.Location = "chennai"
c.Age = 21
b.GetLocation()
c.GetAge()