nerdexam
GIAC

GSSP-.NET · Question #81

(Topic 1) You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You need to write a code segment that transfers the contents of a…

The correct answer is C. BufferedStream BStream = new BufferedStream(NetStr, 8192). See the full explanation below for the reasoning.

Question

  • (Topic 1)

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You need to write a code segment that transfers the contents of a byte array named ToSend by using a NetworkStream object named NetStr. You want to use a cache of size only 8,192 bytes. Which of the following code segments will you use to accomplish the task?

Options

  • AMemoryStream MStream = new MemoryStream(8192);
  • BBufferedStream BStream = new BufferedStream(NetStr);
  • CBufferedStream BStream = new BufferedStream(NetStr, 8192);
  • DMemoryStream MStream = new MemoryStream(8192);

How the community answered

(21 responses)
  • A
    5% (1)
  • B
    10% (2)
  • C
    71% (15)
  • D
    14% (3)

Community Discussion

No community discussion yet for this question.

Full GSSP-.NET Practice