MemoryStream.Close() or MemoryStream.Dispose()

后端 未结 10 633
北海茫月
北海茫月 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:53

    Calling Close() will internally call Dispose() to release the resources.

    See this link for more information: msdn

提交回复
热议问题