GetString with Options returns GetResult.String, not GetResult.Option

Hi,
I am trying to get a string as a userinput, but I also want to give the user an option to chose the previous value, stored in the Settings.

OptionToggle togglePrevious = new OptionToggle(false, previousSuggestion, previousSuggestion);
int optionPrevious = gs.AddOptionToggle("UsePrevious", ref togglePrevious);

GetResult res = gs.Get();

if (res == GetResult.Option)
{
    var option = gs.Option();

    if (option.Index == optionPrevious)
    {
        name = previousSuggestion;
        break;
    }

I detected that the GetResult when clicking the option is not a GetResult.Option, but a GetResult.String, which is very confusing for me right now.
Let’s say the variable previousSuggestion has value Test, the string returned is UsePrevious=Test, which is very confusing for me.
I am sure I messed up something, but I am not sure what!

Thanks,
T.

What about making it so that if the string value is null It simply picks the vlaue stored from the settings? It’s way faster for the end user, since they can just press enter rather than reading through the options.

Hi @farouk.serragedine,

understood and agreed!
But what if I want to give multiple choices?