LANGUAGE
await using
Awaits resource cleanup when the scope exits.
Formal Syntax & Structure
csharp syntaxcsharp
await using var resource = CreateResource();Working Example
Example Snippetcsharp
// Documentary fragment; see lesson for context and imports.await using var lease = new Lease();