I've noticed that in some case, Visual Studio recommends to do this
await using var disposable = new Disposable();
// Do something
Instead of this
using var disposable = new Disposable();
// Do something
What is the difference between using and await using?
How should I decide which one to use?
 
                        
Classic sync using
Classic using calls the
Dispose()method of an object implementing theIDisposableinterface.Is equivalent to
New async await using
The new await using calls and await the
DisposeAsync()method of an object implementing theIAsyncDisposableinterface.Is equivalent to
The IAsyncDisposable Interface was added in
.NET Core 3.0and.NET Standard 2.1.