Posted by: Sourav | August 20, 2016

Abstract Class Example VB,Visual Basic Teacher Sourav,9748184075

Option Strict On
Option Explicit On
Imports System

Module Module1

Sub Main()
Dim absson1 As abstractexample = New absson

End Sub
MustInherit Class abstractexample
Sub New()
Console.WriteLine(“abstract class starts”)

End Sub
MustOverride Sub print()
Sub notabs()
Console.WriteLine(“Hello I am not abstact but can still reside in the abstract class”)

End Sub
End Class
Class absson
Inherits abstractexample

Public Overrides Sub print()
Console.WriteLine(“Hello I am implemented”)

End Sub
End Class
End Module


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: