wrapping MemoryStream in a using

前端 未结 6 1999
死守一世寂寞
死守一世寂寞 2020-12-17 19:14

I\'ve been told that System.IO.MemoryStream need not be wrapped in a using block because there is no underlying resource, this kinda goes against what i\'ve always

6条回答
  •  臣服心动
    2020-12-17 19:42

    You do not lose anything by wrapping the memory stream in a using block, so if there's doubt, just do it. :)

提交回复
热议问题