Skip to main content

RCS1261: Resource can be disposed asynchronously

Properties​

PropertyValue
Default SeverityInfo
Minimum language version-

Examples​

Example #1​

diagnostic.cs
async Task FooAsync()
{
using var disposable = await GetDisposableAsync();
}
fix.cs
async Task FooAsync()
{
await using var disposable = await GetDisposableAsync();
}

Applies to​