Trying to understand the 'using' statement better

后端 未结 8 1242
小鲜肉
小鲜肉 2021-01-18 17:26

I have read a couple of articles about the using statement to try and understand when it should be used. It sound like most people reckon it should be used as much as possib

8条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-18 17:59

    You would never be wrong if you use using for every IDisposable that you use. There is no limit of how many nested using blocks you use.

提交回复
热议问题