VB.Net program to implement an interface in the structure
'VB.net program to implement an interface in the structure.
Module Module1
Interface ISample
Sub Fun()
End Interface
Structure Sample
Implements ISample
Sub Fun() Implements ISample.Fun
' Method Implementation
Console.WriteLine("Fun() called inside the structure")
End Sub
End Structure
Sub Main()
Dim S As New Sample()
S.Fun()
End Sub
End Module
Output
Fun() called inside the structure
Press any key to continue . . .
Table of Contents