Skip to content

Instantly share code, notes, and snippets.

@igorlukanin
Created November 2, 2017 13:22
Show Gist options
  • Save igorlukanin/88a5033cb5ccee6ca65c317fa45bbeaa to your computer and use it in GitHub Desktop.
Save igorlukanin/88a5033cb5ccee6ca65c317fa45bbeaa to your computer and use it in GitHub Desktop.
var streamReader = new StreamReader("c:\\file.txt");
try
{
Console.Write(streamReader.ReadToEnd());
}
finally
{
if (streamReader != null)
streamReader.Dispose();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment