RCS1261: Resource can be disposed asynchronously
Properties
Property | Value |
---|---|
Default Severity | Info |
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();
}