Console.AskYesNo() Method

Asks a yes/no question using the input field. Returns the answer as True/False.

Syntax

Console.AskYesNo(Prompt, [WebTimeout])

The method syntax has these parts:

Part Description
Prompt (String) string containing a yes/no question to ask
WebTimeout (Long) Timeout for the web virtual console (seconds, default 300) See note below
Return (Boolean) True if the Yes button was pushed, False if the No button was pushed.

Remarks

The user must press either yes or no, there is no way to cancel. For the web virtual console, a second optional parameter WebTimeout may be supplied. See below.

This method will raise an error after 300 seconds if the request comes from the web and the user does not respond within this interval. The timeout can be modified by including the optional WebTimeout parameter in the call.

WebTimeout Notes