13.07.2015 Views

C# Language Specification - Willy .Net

C# Language Specification - Willy .Net

C# Language Specification - Willy .Net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>C#</strong> LANGUAGE SPECIFICATION}}using (TextReader r = File.OpenText("log.txt")) {string s;while ((s = r.ReadLine()) != null) {Console.WriteLine(s);}}Since the TextWriter and TextReader classes implement the IDisposable interface, the example canuse using statements to ensure that the underlying file is properly closed following the write or readoperations. end example]200

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!