📄 interface.vb
字号:
Option Strict OffImports SystemInterface I Function F()End InterfaceClass C Implements I Public Function F() Implements I.F End FunctionEnd ClassModule InterfaceTest Function Main() As Integer Try Dim x As C = New C() x.F() Catch e As Exception System.Console.WriteLine("#A1:Interface:Failed-error creating instance of class implementing interface" + e.Message) : Return 1 End Try Try Dim y As I = New C() y.F() Catch e As Exception System.Console.WriteLine("#A2:Interface:Failed - error declaring varaibles of the interface") : Return 1 System.Console.WriteLine(e.Message) : Return 1 End Try End FunctionEnd Module
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -