nerdexam
GIAC

GSSP-.NET · Question #181

(Topic 2) You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET as its application development platform. You need to read the entire contents of a file named Msg.txt into…

The correct answer is C. string NewResult = null. See the full explanation below for the reasoning.

Question

  • (Topic 2)

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET as its application development platform. You need to read the entire contents of a file named Msg.txt into a single string variable using .NET Framework. Which of the following code segments will you use to accomplish the task?

Options

  • Astring NewResult = string.Empty;
  • Bstring NewResult = null;
  • Cstring NewResult = null;
  • Dstring NewResult = null;

How the community answered

(22 responses)
  • A
    9% (2)
  • B
    14% (3)
  • C
    73% (16)
  • D
    5% (1)

Community Discussion

No community discussion yet for this question.

Full GSSP-.NET Practice