# LibTmux.TmuxEnvironment.SetAsync

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