Visual Basic .NET/Interfaces
Interfaces
editAn interface is the public methods of a class. They are declared with the Implements
keyword.
To create an interface:
Public Interface Interface1
Function Function1() As String
End Interface
To use it from a class:
Public Class MyClassFromInterface
implements Interface1()
' by pressing enter the IDE creates automatically the implemented interface elements:
Public Function Function1() As String Implements Interface1.Function1
' ...
End Function
End Class