# LibTmux.TmuxEnvironment.SetAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Environment/TmuxEnvironmentOperations.cs#L118
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-tmuxenvironment-setasync/

```
LibTmux.TmuxEnvironment.SetAsync(name: string, value: string, expandFormats: bool, hidden: bool, cancellationToken: CancellationToken) -> Task<TmuxEnvironmentEntry>
```

Sets one variable.

## Parameters

- `name` (`string`): The variable name.
- `value` (`string`): The value to give it.
- `expandFormats` (`bool`): Whether tmux expands the value as a format first.
- `hidden` (`bool`): Whether the value is kept but not reported back.
- `cancellationToken` (`CancellationToken`): Cancels the tmux commands.

## Returns

The variable as tmux holds it afterwards.
