Class Question
A single question within an AskQuestionsRequest.
public sealed class Question
- Inheritance
-
Question
- Inherited Members
Properties
DefaultValue
Pre-filled value shown to the user. If the user submits without typing, the default is used as the answer (only when Required is false or a default exists).
public string? DefaultValue { get; init; }
Property Value
Key
Stable identifier used as the key in Answers.
public string Key { get; init; }
Property Value
Options
Available options for SingleSelect and MultiSelect questions.
public IReadOnlyList<string> Options { get; init; }
Property Value
Prompt
Text shown to the user as the question prompt.
public string Prompt { get; init; }
Property Value
Required
When true the user must provide a non-empty answer before proceeding.
public bool Required { get; init; }
Property Value
Type
Input type that determines how the TUI renders and captures the answer.
public QuestionType Type { get; init; }
Property Value
Validation
Optional validation rules applied before accepting the answer.
public QuestionValidation? Validation { get; init; }