Program in VB.Net to build a class which implements an interface

Que : Write a program in VB.Net to build a class which implements an interface

Ans:

Imports System.Console

 

Interface inf1

Sub show()

Sub disp()

End Interface

 

Class class1 : Implements inf1

 

Public Sub disp() Implements inf1.disp

WriteLine("Disp of class 1")

End Sub

 

Public Sub show() Implements inf1.show

WriteLine("show of Class 1")

End Sub

End Class

 

 

Module Module1

Sub Main()

Dim obj As class1 = New class1()

obj.disp()

obj.show()

 

End Sub

 

End Module

OUTPUT :

Write a program in VB.Net to build a class which implements an interface.

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?