Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
'type': type used in an asynchronous using
statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.
The expression inside an await using
statement must have a DisposeAsync
method.
To correct this error
Remove the await using
keywords, or implement a suitable DisposeAsync
method.
Example
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
// error CS8410: 'Example': type used in an asynchronous using statement
// must be implicitly convertible to 'System.IAsyncDisposable' or implement
// a suitable 'DisposeAsync' method.
await using var example = new Example();
}
}
class Example
{
}
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.