WithConverter<T>(TextPrompt<T>, Func<T, string>) Method

Sets the function to create a display string for a given choice.
public static TextPrompt<T> WithConverter<T>(this TextPrompt<T> obj, Func<T, string> displaySelector)
Namespace
Spectre.Console
Containing Type
TextPromptExtensions

Parameters

T
The prompt type.

Parameters

TextPrompt<T> obj
The prompt.
Func<T, string> displaySelector
The function to get a display string for a given choice.

Returns