1.

Which among the following classes are used to perform the character based file operations?(a) StreamReader(b) InputReaderWriter(c) OutputStream(d) All of the mentionedThis question was posed to me in unit test.This intriguing question comes from Character Stream in chapter Console I/O Operations and Stream Classes of C#

Answer»

The CORRECT option is (a) StreamReader

For explanation: In general, to perform character-based file operations, wrap a FILESTREAM inside a StreamReader or a STREAMWRITER. These classes automatically CONVERT a byte STREAM into a character stream, and vice versa.



Discussion

No Comment Found

Related InterviewSolutions