TYPE

EnumeratorCancellationAttribute

Connects the enumeration token to an async iterator parameter.

Formal Syntax & Structure

csharp syntaxcsharp
[EnumeratorCancellation] CancellationToken token = default

Working Example

Example Snippetcsharp
// Documentary fragment; see lesson for context and imports.[EnumeratorCancellation] CancellationToken token = default
C# & .NET Reference