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,
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)- A4% (2)
- B6% (3)
- C12% (6)
- D78% (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
Community Discussion
No community discussion yet for this question.