Skip to content

Instantly share code, notes, and snippets.

@matjanos
Created December 14, 2016 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matjanos/74b4661db8cf73507f950ab1fb183b51 to your computer and use it in GitHub Desktop.
Save matjanos/74b4661db8cf73507f950ab1fb183b51 to your computer and use it in GitHub Desktop.
DevStyle - konkurs
using System;
using System.IO;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello DevStyle!");
FileStream textStream = File.Open("test.txt",FileMode.Open);
try
{
StreamReader reader = new StreamReader(textStream);
Console.Write(reader.ReadLine());
}
finally
{
if (textStream != null)
((IDisposable)textStream).Dispose();
}
}
}
@matjanos
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment