22Files and Streams


When you’re reading and writing to files and directories you can use simple APIs, or you can use advanced ones that offer more features. You also have to differentiate between .NET classes and functionality offered from the Windows Runtime. From Universal Windows Platform (UWP) Windows apps, you don’t have access to the file system in any directory; you have access only to specific directories. Alternatively, you can let the user pick files. This chapter covers all these options. You’ll read and write files by using a simple API and get into more features by using streams. You’ll use both .NET types and types ...

Get Professional C# 7 and .NET Core 2.0, 7th Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.