Compartilhar via


PromptOptions<TResult>.WithCancel(TResult, Boolean) Method

Definition

Adds a new "Cancel" choice to the existing choices.

public Microsoft.VisualStudio.Extensibility.Shell.Prompt.PromptOptionsWithCancel<TResult> WithCancel (TResult cancelReturns, bool cancelIsDefault = false);
member this.WithCancel : 'Result * bool -> Microsoft.VisualStudio.Extensibility.Shell.Prompt.PromptOptionsWithCancel<'Result (requires 'Result : struct)>
Public Function WithCancel (cancelReturns As TResult, Optional cancelIsDefault As Boolean = false) As PromptOptionsWithCancel(Of TResult)

Parameters

cancelReturns
TResult

The result value to return when selects the "Cancel" choice.

cancelIsDefault
Boolean

Whether the "Cancel" choice should be presented as the default choice.

Returns

A new instance of PromptOptionsWithCancel<TResult>.

Applies to