Practice and explore
Test your knowledge and understanding by answering some questions, getting some hands-on practice, and exploring this chapter's topics with deeper research.
Exercise 10.1 – test your knowledge
Answer the following questions:
What is the difference between using the
Fileclass and theFileInfoclass?What is the difference between the
ReadBytemethod and theReadmethod of a stream?When would you use
StringReader,TextReader, andStreamReaderclasses?What does the
DeflateStreamtype 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?
Which Microsoft technology uses the
DataContractSerializertype by default?Is it possible to create your own custom runtime serializers?
Exercise 10.2 – practice serializing as XML
Create a console application named Ch10_Exercise02 that creates a list of...