OK so here's my code so far.
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
I'm trying to raise the event count when the enter key is pressed. What am I doing wrong?