使用using,定义范围,在该范围结束时回收资源。注意使用前提:该对象必须继承了IDisposable接口,功能等同于try{}Finally{}。https://www.cnblogs.com/xiaobiexi/p/6179127.html参考博客