Examples from Chapter 15 (Files and Streams) of Programming C# 8.0 (O'Reilly).
- Example 1. The most important members of Stream
- Example 2. Reading a specific number of bytes
- Example 3. The Seek method
- Example 4. TextReader chunk reading methods
- Example 5. Writing text to a file with StreamWriter
- Example 6. Wrapping a string in a StringReader
- Example 7. Capturing console output in a StringWriter
- Example 8. Writing with the Windows 1252 code page
- Example 9. FileStream constructors taking a path
- Example 10. File.Create versus new FileStream
- Example 11. Appending to a file with StreamWriter
- Example 12. Creating an appending StreamWriter with File.AppendText
- Example 13. Appending a single string to a file
- Example 14. Appending a single line to a file
- Example 15. Recursively searching for files of a particular type
- Example 16. Displaying information about a file with FileInfo
- Example 17. Discovering where to store settings
- Example 18. A serializable type
- Example 19. Serializing with the BinaryFormatter
- Example 20. Deserializing with the BinaryFormatter
- Example 21. Simple JSON.NET model
- Example 22. Serializing data with JsonConvert
- Example 23. Deserializing data with JsonConvert
- Example 24. Controlling the JSON with JsonProperty attributes
- Example 25. Reading JSON with JToken
- Example 26. Working with data in LINQ to JSON
- Example 27. Querying over JSON data