You are on page 1of 2

2/19/2021 StreamReader.Close Method (System.

IO) | Microsoft Docs

Namespace: System.IO
Assembly: System.Runtime.dll
In this article
Definition
Remarks
Applies to
See also

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

C# = Copy

public override void Close ();

Remarks
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
Product Versions

.NET 5.0

.NET Core 2.0, 2.1, 2.2, 3.0, 3.1

.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

Product Versions

.NET Standard 2.0, 2.1

i d id 1
https://docs.microsoft.com/en-us/dotnet/api/system.io.streamreader.close?view=net-5.0#System_IO_StreamReader_Close 1/2
2/19/2021 StreamReader.Close Method (System.IO) | Microsoft Docs
Xamarin.Android 7.1

Xamarin.iOS 10.8

Xamarin.Mac 3.0

See also
File and Stream I/O
How to: Read Text from a File
How to: Write Text to a File

Is this page helpful?


 Yes  No

https://docs.microsoft.com/en-us/dotnet/api/system.io.streamreader.close?view=net-5.0#System_IO_StreamReader_Close 2/2

You might also like