Program to demonstrate abstract class and abstract methods in VB.net.

Ques :Write a program to demonstrate abstract class and abstract methods in VB.net.

Imports System.Console

Public MustInherit Class a1
Public Sub show()
WriteLine("Show fn A1")
End Sub
Public MustOverride Sub disp()
End Class

Class a2 : Inherits a1
Public Overrides Sub disp()
WriteLine("Disp of a2")
End Sub
End Class

Module Module1
Sub Main()
Dim obj As a2 = New a2()
obj.show()
obj.disp()

End Sub
End Module

Output screenshot :

Program to demonstrate abstract class and abstract methods in VB.net.

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

©2017 Being Topper

Log in with your credentials

Forgot your details?