module1.vb
来自「编程之道VB.NETt程序设计入门-589M.zip」· VB 代码 · 共 35 行
VB
35 行
Module Module1
Public Interface IScrollable
Sub Scroll()
End Interface
Public Class ScrollDog
Inherits Pet.Dog
Implements IScrollable
Public Sub New(ByVal birthDate As Date)
MyBase.New(birthDate)
End Sub
Public Sub Scroll() Implements IScrollable.Scroll
Console.WriteLine("ScrollDog " & Name & " is scrolling!")
End Sub
End Class
Sub Main()
Dim s As IScrollable
Dim sd As ScrollDog
sd = New ScrollDog("1998-9-9")
sd.Name = "ScrollDoggy"
sd.FetchSaucer()
sd.Scroll()
s = New ScrollDog("1999-9-9")
s.Scroll()
Console.ReadLine()
End Sub
End Module
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?