# SetSelectedOption(int)

Method in [Dialogue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue)

## Summary

Signals to the [Dialogue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue) that the user has selected a specified [Option](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.optionset/yarn.optionset.option) .

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

## Remarks

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

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

## Parameters

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

## See Also

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