98-372 · Question #112
Which class is used to write primitive types in binary to a stream and supports writing strings in a specific encoding?
The correct answer is C. BinaryWriter class. The BinaryWriter class is used to write primitive types in binary to a stream and supports writing strings in a specific encoding. Any derived class can override the methods of the BinaryWriter class to give distinctive character encodings. Answer: A is incorrect. The…
Question
Which class is used to write primitive types in binary to a stream and supports writing strings in a specific encoding?
Options
- ATextReader class
- BBinaryReader class
- CBinaryWriter class
- DTextWriter class
How the community answered
(53 responses)- A4% (2)
- B9% (5)
- C81% (43)
- D6% (3)
Explanation
The BinaryWriter class is used to write primitive types in binary to a stream and supports writing strings in a specific encoding. Any derived class can override the methods of the BinaryWriter class to give distinctive character encodings. Answer: A is incorrect. The TextReader class exposes a reader that can read a sequential series Answer: D is incorrect. The TextWriter class exposes a writer that can write a sequential series of Answer: B is incorrect. The BinaryReader class is used to read primitive data types as binary values in a specific encoding. Characters can be read from the stream using the given encoding system. The default encoding system is equal to New UTF8Encoding.
Topics
Community Discussion
No community discussion yet for this question.