
C# 7 and .NET Core: Modern Cross-Platform Development

Test your knowledge and understanding by answering some questions, get some hands-on practice, and explore this chapter's topics with deeper research.
Answer the following questions:
What is the difference between using the File
class and the FileInfo
class?
What is the difference between the ReadByte
method and the Read
method of a stream?
When would you use the StringReader
, TextReader
, and StreamReader
classes?
What does the DeflateStream
type do?
How many bytes per character does the UTF-8 encoding use?
What is an object graph?
What is the best serialization format to choose for minimizing space requirements?
What is the best serialization format to choose for cross-platform compatibility?
Create a console application named Ch10_Exercise02
that creates a list of shapes, uses serialization to save it to the filesystem using XML, and then deserializes it back:
// create a list of Shapes to serialize...
Change the font size
Change margin width
Change background colour