Try this
Sub Main()
AddHandler count, AddressOf MyFunction
Console.WriteLine("to start the countdown process type go")
Dim input As String = Console.ReadLine
If input.ToLower = "go" Then
RaiseEvent Count()
Else
Console.WriteLine("you didn't type 'go'")
Console.ReadLine()
End If
End Sub
To specifically answer your question about what you are doing wrong.
You are mixing up two very different methods for working with user input. e
is usually used inside an event handler and contains information about the event. You are working in a console application though, which doesn't raise event for input, you have to specifically poll for input. This is what console.readLine does. It returns a string that contains what the user typed. It only returns after the user pressed enter, otherwise it waits for more character. You need to get the string that the user typed and compare it to the string you are looking for. I used ToLower
to force the string to all lowercase letters in so it would match no matter how the user typed it.