# LibTmux.Session.FindWindowAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Session.Relations.cs#L91
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-session-findwindowasync/

```
LibTmux.Session.FindWindowAsync(id: WindowId, cancellationToken: CancellationToken) -> Task<Window?>

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

Reads one of this session's windows by identifier.

A typed identifier is unique in a session that links a window at only
one index; the string overload also accepts a window name, which two
windows can share. When this session links the same window at more
than one index, this returns whichever placement tmux lists first.

## Parameters

- `id` (`WindowId`): The window identifier to look for. (for `FindWindowAsync(id, cancellationToken)`)
- `cancellationToken` (`CancellationToken`): Cancels the tmux command.
- `target` (`string`): A tmux window target inside this session. (for `FindWindowAsync(target, cancellationToken)`)

## Returns

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