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