Skip to content

ConsolePrompt

Allows prompting the user for input of various types.

Methods

void GetChoiceChange(string message, T& current, Nullable defaultChoice, int offset)

T GetChoiceChange(string message, T current, Nullable defaultChoice, int offset)

Nullable GetChoiceDone(string message, string defaultOption, int offset)

T GetChoice(string message, int offset)

T GetChoice(string message, string defaultOption, int offset, Boolean& defaultOptionSelected)

int GetChoiceIndex(string message, IEnumerable choices, int offset)

Prompts the user to select a choice, and returns the index of the selected choice.

int GetChoiceIndex(string message, List choices, int offset)

Prompts user to select a choice, and returns the index of the selected choice.

string GetChoice(string message, IEnumerable choices, int offset)

Prompts the user to select a choice from a list of choices, and returns the selected choice as a string.

ICollection GetCollectionEnum(string message, string messageIndividual)

ICollection GetCollection(string message, Func func, string messageIndividual)

ICollection GetCollection(string message, string messageIndividual)

Prompt for collection of strings.

ICollection GetCollectionInt(string message, string messageIndividual)

Prompt for collection of integers.

ICollection GetCollectionDouble(string message, string messageIndividual)

Prompt for collection of doubles.

T GetType(string message, Func func)

int GetIntRange(string message, int max, int min, bool inclusive)

Prompts user for an integer value within a specified range.

int GetInt(string message)

Prompts user for an integer value.

void GetStringChange(string message, String& original)

string GetStringChange(string message, string value)

Prompts user whether to change a string value.

string GetString(string message)

Prompts user for a string value.

bool GetYesNo(string message)

Prompts user for a yes or no response.