SqlDataReader: In this scenario, will the reader get closed?
问题 I am cleaning up the DataReaders in an old .NET 1.1 project that I inherited. The previous developer coded the data-access-layer in such a way that most of the DAL methods returned SqlDataReaders (thus leaving it up to the caller to properly call the .Close() or .Dispose() methods). I have come across a situation, though, where a caller is not catching the returned SqlDataReader (and therefore is not disposing of it properly). See the code below: Data Access Method: Public Shared Function