nerdexam
GIAC

GSSP-NET · Question #148

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…

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

Question

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? GIAC GSSP-.NET Exam

Options

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

How the community answered

(47 responses)
  • A
    11% (5)
  • B
    4% (2)
  • C
    81% (38)
  • D
    4% (2)

Community Discussion

No community discussion yet for this question.

Full GSSP-NET Practice