VB.Net program to demonstrate the multiple-inheritance using interface and structure
'VB.net program to demonstrate the multiple-inheritance
'using interface and structure.
Module Module1
Interface ISample1
Sub Fun1()
End Interface
Interface ISample2
Sub Fun2()
End Interface
Interface ISample3
Sub Fun3()
End Interface
Structure Sample
Implements ISample1, ISample2, ISample3
Sub Fun1() Implements ISample1.Fun1
Console.WriteLine("Fun1() called inside the structure")
End Sub
Sub Fun2() Implements ISample2.Fun2
Console.WriteLine("Fun2() called inside the structure")
End Sub
Sub Fun3() Implements ISample3.Fun3
Console.WriteLine("Fun3() called inside the structure")
End Sub
End Structure
Sub Main()
Dim S As New Sample()
S.Fun1()
S.Fun2()
S.Fun3()
End Sub
End Module
Output
Fun1() called inside the structure
Fun2() called inside the structure
Fun3() called inside the structure
Press any key to continue . . .
Table of Contents