StreamReader.Close Method


Closes the StreamReader object and the underlying stream, and releases any system resources associated with the reader.

 override void Close();
public override void Close ();
override this.Close : unit -> unit
Public Overrides Sub Close ()


This method overrides the TextReader.Close method.

This implementation of Close calls the Dispose method, passing a true value.

Following a call to Close, any operations on the reader might raise exceptions.

Applies to

See also