Visual Basic .NET/介面
外觀
一個介面是類的公共方法。它們用 Implements 關鍵字宣告。
建立介面
Public Interface Interface1
Function Function1() As String
End Interface
從類中使用它
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