> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue/yarn.dialogue.setselectedoption.md).

# SetSelectedOption(int)

Method in [Dialogue](/api/csharp/yarn/yarn.dialogue.md)

## Summary

Signals to the [Dialogue](/api/csharp/yarn/yarn.dialogue.md) that the user has selected a specified [Option](/api/csharp/yarn/yarn.optionset/yarn.optionset.option.md) .

```csharp
public void SetSelectedOption(int selectedOptionID)
```

## Remarks

After the Dialogue delivers an [OptionSet](/api/csharp/yarn/yarn.optionset.md), this method must be called before [Continue()](/api/csharp/yarn/yarn.dialogue/yarn.dialogue.continue.md) is called.

The ID number that should be passed as the parameter to this method should be the [ID](/api/csharp/yarn/yarn.optionset/yarn.optionset.option/yarn.optionset.option.id.md) field in the [Option](/api/csharp/yarn/yarn.optionset/yarn.optionset.option.md) that represents the user's selection.

## Parameters

| Name                   | Description                                         |
| ---------------------- | --------------------------------------------------- |
| `int` selectedOptionID | The ID number of the Option that the user selected. |

## See Also

* [OptionsHandler](/api/csharp/yarn/yarn.optionshandler.md): Represents the method that is called when the Dialogue delivers an [OptionSet](/api/csharp/yarn/yarn.optionset.md) .
* [OptionSet](/api/csharp/yarn/yarn.optionset.md): A set of [Option](/api/csharp/yarn/yarn.optionset/yarn.optionset.option.md) s, sent from the [Dialogue](/api/csharp/yarn/yarn.dialogue.md) to the game.
* [Dialogue.Continue()](/api/csharp/yarn/yarn.dialogue/yarn.dialogue.continue.md): Starts, or continues, execution of the current Program.
