O'Reilly logo

C# Primer Plus by Klaus Michelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Need for Files

Why do we need files? You have already used the Console.ReadLine and Console.WriteLine methods numerous times to receive input from the keyboard and send output to the screen. However, the keyboard and screen data are only very temporary; as soon as the program terminates, all the data is lost. On the other hand, files allow you to store data permanently after the program has ended and after the computer is switched off. A file's content can be used repeatedly by the same or by different programs, and files allow you to handle large amounts of data in a convenient fashion.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required