According to this, Dispose() on a SqlConnection calls Close(), so you don't need to call both, just Dispose(). Is it the same for a SqlDataReader?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You only need to call Dispose because calls Close.
I used .NET Reflector and found that DbDataReader's (the base of SqlDataReader) Dispose method does call Close.