# LibTmux.TmuxBuffers.SetAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Buffers/TmuxBuffers.cs#L29
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-tmuxbuffers-setasync/

tmux command: [`set-buffer`](/en/tmux/latest/manual/set-buffer/)

```
LibTmux.TmuxBuffers.SetAsync(data: string, name: string?, append: bool, cancellationToken: CancellationToken) -> Task
```

Puts text into a buffer.

## Parameters

- `data` (`string`): The text to store.
- `name` (`string?`): The buffer name, or null for a new one.
- `append` (`bool`): Whether the text joins what is already there.
- `cancellationToken` (`CancellationToken`): Cancels the tmux command.

## Returns

A task that completes once tmux has stored it.

## Raises

- [`ArgumentNullException`](https://learn.microsoft.com/dotnet/api/system.argumentnullexception): <paramref name="data" /> is null.
