IDisposable和IAsyncDisposable接口(链接)
关于IDisposable接口,我相信大家都很熟悉了,下面是微软官方文档的介绍:
在C# 8.0中,微软引入了IAsyncDisposable接口,下面是微软官方文档的介绍:
Implement a DisposeAsync method
如何使用IAsyncDisposable接口,可以查看下面的帖子:
What is the difference between using and await using? And how can I decide which one to use?