# LibTmux.TmuxEnvironment.SetAsync

- **Module:** LibTmux.TmuxEnvironment
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Environment/TmuxEnvironmentOperations.cs#L118
- **Page:** https://libtmux.org/en/dotnet/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.
