Examples from Chapter 15 (Files and Streams) of Programming C# 10.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 5. TextReader chunk reading methods
- Example 6. Writing text to a file with StreamWriter
- Example 7. Wrapping a string in a StringReader
- 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. Simple JSON serialization model
- Example 19. Serializing data with JsonSerializer
- Example 20. Deserializing data with JsonSerializer
- Example 21. Controlling the JSON with JsonPropertyName attributes
- Example 22. Using JsonSerializerDefaults to get camelCased property names
- Example 23. A type supporting circular references
- Example 24. Serializing a type supporting circular references
- Example 25. Dynamic JSON inspection with JsonDocument and JsonElement
- Example 26. Dynamic JSON array enumeration with JsonDocument and JsonElement
- Example 27. Reading JSON properties with JsonElement
- Example 28. Modifying JSON with
JsonNode