📄 inheritanceb.vb
字号:
Option Strict OffImports SystemPublic Class C1 Public Overridable Function F1(ByVal name As String) Dim t As Type = GetType(C1) If t.name <> name Then Throw New Exception("#A1, Should not some here") End If End FunctionEnd ClassPublic Class C2 Inherits C1 Public Overrides Function F1(ByVal name As String) Dim t As Type = GetType(C2) If t.name <> name Then Throw New Exception("#A2, Should not some here") End If End FunctionEnd ClassModule InheritanceE Function Main() As Integer Dim b As Object = New C1() b.F1("C1") Dim d As Object = New C2() d.F1("C2") End FunctionEnd Module
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -