nerdexam
Microsoft

98-372 · Question #34

Which of the following is the correct way of using the System namespace?

The correct answer is D. using System;. Most C# applications start with a section of using directives. The section lists the namespaces that the application will be using regularly, and saves the programmer from mentioning a fully qualified name every time a method contained within the namespaces is used. For instance,

Understanding Namespaces and Classes

Question

Which of the following is the correct way of using the System namespace?

Options

  • Aclass System;
  • Bimporting System;
  • Cimplementing System;
  • Dusing System;

How the community answered

(49 responses)
  • A
    4% (2)
  • B
    6% (3)
  • C
    12% (6)
  • D
    78% (38)

Explanation

Most C# applications start with a section of using directives. The section lists the namespaces that the application will be using regularly, and saves the programmer from mentioning a fully qualified name every time a method contained within the namespaces is used. For instance, by including the line: At the start of a program, the programmer can use the following code: Console.WriteLine("Welcome, World!"); Rather than using the following code: System.Console.WriteLine("Welcome, World!");

Topics

#using directive#System namespace#namespace syntax#C# syntax

Community Discussion

No community discussion yet for this question.

Full 98-372 Practice