好的,到目前为止,这是我的代码。
Module Module1
Public Event count()
Sub Main()
AddHandler count, AddressOf MyFunction
Console.WriteLine("to start the countdown process type go")
Console.ReadLine()
If e.KeyCode = Keys.Enter Then
RaiseEvent count()
End If
Console.ReadKey()
End Sub
Sub MyFunction()
Dim a As Integer = 16
Dim b As Integer = 6
Console.WriteLine("Now we are going to count to a number using only even numbers")
Do Until b > a
Console.WriteLine(b)
b += 2
Loop
Console.ReadKey()
End Sub
End Module
当按下回车键时,我试图提高事件计数。我究竟做错了什么?