ConfirmAsync(string, bool, CancellationToken) Method

Displays a prompt with two choices, yes or no.
public static Task<bool> ConfirmAsync(string prompt, bool defaultValue = true, CancellationToken cancellationToken = default(CancellationToken))
Namespace
Spectre.Console
Containing Type
AnsiConsole

Parameters

string prompt
The prompt markup text.
bool defaultValue
Specifies the default answer.
CancellationToken cancellationToken
The token to monitor for cancellation requests.

Returns

Task<bool>