MemoryStream.Close() or MemoryStream.Dispose()

后端 未结 10 605
北海茫月
北海茫月 2020-11-29 03:19

Which one do I call?

Is it necessary to call both?

Will the other throw an exception if I have already called one of them?

10条回答
  •  独厮守ぢ
    2020-11-29 03:39

    Use using block so that your object is disposed if its implements IDisposable interface

提交回复
热议问题