# LibTmux.Session.GetWindowAsync

- **Module:** LibTmux.Session
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Session.Relations.cs#L72
- **Page:** https://libtmux.org/reference/dotnet/libtmux-session-getwindowasync/

```
LibTmux.Session.GetWindowAsync(target: string, cancellationToken: CancellationToken) -> Task<Window?>
```

Reads one of this session's windows by target.

A target naming a window in another session answers null rather than
that window: the question asked is which of this session's windows it
is, and tmux resolving it elsewhere is not an answer to that.

## Parameters

- `target` (string) — A tmux window target inside this session.
- `cancellationToken` (CancellationToken) — Cancels the tmux command.

## Returns

The window, or null when this session has no such window.
