# C#: Groups

Source: https://tweens.gd/csharp/api/groups/

A `Group` treats several tweens as one step: it pauses, cancels, and completes them together. [Sequences](https://tweens.gd/csharp/sequences/#play-together) introduces groups.

```csharp
var step = Group.Of(sprite.TweenPositionX(300, 0.6), label.TweenModulateAlpha(0, 0.6));
await step.End;
```

## Create

| Member | Type | Meaning |
| --- | --- | --- |
| [`Group.Of(tweens)`](https://tweens.gd/csharp/api/groups/#group-of-tweens) | `Group` | Group running handles, on any targets |
| [`node.Tween(first, second)`](https://tweens.gd/csharp/api/groups/#node-tween-first-second) | `Group` | Start several definitions on one node as a group; see [starting playback](https://tweens.gd/csharp/api/start/#on-a-node) |

## Control

| Member | Type | Meaning |
| --- | --- | --- |
| [`Pause()`](https://tweens.gd/csharp/api/groups/#pause) | `void` | Pause every member |
| [`Resume()`](https://tweens.gd/csharp/api/groups/#resume) | `void` | Resume every member |
| [`IsPaused`](https://tweens.gd/csharp/api/groups/#ispaused) | `bool` | True while every active member is paused |
| [`Cancel()`](https://tweens.gd/csharp/api/groups/#cancel) | `void` | Cancel every member still playing |

## Status

| Member | Type | Meaning |
| --- | --- | --- |
| [`Members`](https://tweens.gd/csharp/api/groups/#members) | `IReadOnlyList<TweenInstance>` | The grouped handles |
| [`IsTerminal`](https://tweens.gd/csharp/api/groups/#isterminal) | `bool` | True once the group has ended |
| [`CompletionReason`](https://tweens.gd/csharp/api/groups/#completionreason) | `Reason?` | `Completed`, or the reason of the first member that stopped early; `null` until the group ends |
| [`Error`](https://tweens.gd/csharp/api/groups/#error) | `Exception?` | The exception that faulted a member, if one did |

## Awaiting

| Member | Type | Meaning |
| --- | --- | --- |
| [`End`](https://tweens.gd/csharp/api/groups/#end) | `Task<Reason>` | Completes when every member has ended; faults when a member faults |

## Rules

-   If one member stops early or faults, the group cancels the others and reports that member’s reason or exception.
-   A group has no `State` or `Progress`; read its members for those.
-   A group doesn’t link timing: each member keeps its own start and delay. A [Chain](https://tweens.gd/csharp/api/chains/) plays definitions in order.
