Jaa


DataReader.Close Method

Definition

Closes the current stream and releases system resources.

public:
 virtual void Close() = Close;
void Close();
// This member is not implemented in C#
function close()
' This member is not implemented in VB.NET

Implements

M:Windows.Foundation.IClosable.Close M:System.IDisposable.Close

Remarks

DataReader takes ownership of the stream that is passed to its constructor. Calling this method also calls on the associated stream. After calling this method, calls to most other DataReader methods will fail.

If you do not want the associated stream to be closed when the reader closes, call DataReader.DetachStream before calling this method.

Applies to