# LibTmux.LinkWindowRequest.LinkWindowRequest

- **Module:** LibTmux.LinkWindowRequest
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Requests/LinkWindowRequest.cs#L13
- **Page:** https://libtmux.org/reference/dotnet/libtmux-linkwindowrequest-linkwindowrequest/

```
LibTmux.LinkWindowRequest.LinkWindowRequest(targetSession: string, targetIndex: string?, direction: WindowDirection?, replaceExisting: bool, detach: bool)
```

Initializes a window-link request.

## Parameters

- `targetSession` (string) — The session the window is linked into.
- `targetIndex` (string?) — The index to link at, or null for the next free one.
- `direction` (WindowDirection?) — Whether to insert before or after the target.
- `replaceExisting` (bool) — Whether a window already at the index is replaced.
- `detach` (bool) — Whether the linked window is left unselected.

## Raises

- `ArgumentException` — <paramref name="targetSession" /> is blank.
