C# Programming - Namespaces

Why should I learn to solve C# Programming questions and answers section on "Namespaces"?

Learn and practise solving C# Programming questions and answers section on "Namespaces" to enhance your skills so that you can clear interviews, competitive examinations, and various entrance tests (CAT, GATE, GRE, MAT, bank exams, railway exams, etc.) with full confidence.

Where can I get the C# Programming questions and answers section on "Namespaces"?

IndiaBIX provides you with numerous C# Programming questions and answers based on "Namespaces" along with fully solved examples and detailed explanations that will be easy to understand.

Where can I get the C# Programming section on "Namespaces" MCQ-type interview questions and answers (objective type, multiple choice)?

Here you can find multiple-choice C# Programming questions and answers based on "Namespaces" for your placement interviews and competitive exams. Objective-type and true-or-false-type questions are given too.

How do I download the C# Programming questions and answers section on "Namespaces" in PDF format?

You can download the C# Programming quiz questions and answers section on "Namespaces" as PDF files or eBooks.

How do I solve C# Programming quiz problems based on "Namespaces"?

You can easily solve C# Programming quiz problems based on "Namespaces" by practising the given exercises, including shortcuts and tricks.

Exercise : Namespaces - General Questions
  • Namespaces - General Questions
1.
If a namespace is present in a library then which of the following is the correct way to use the elements of the namespace?
Add Reference of the namespace.
Use the elements of the namespace.
Add Reference of the namespace.
Import the namespace.
Use the elements of the namespace.
Import the namespace.
Use the elements of the namespace.
Copy the library in the same directory as the project that is trying to use it.
Use the elements of the namespace.
Install the namespace in Global Assembly Cache.
Use the elements of the namespace.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

2.
Which of the following is NOT a namespace in the .NET Framework Class Library?
System.Process
System.Security
System.Threading
System.Drawing
System.Xml
Answer: Option
Explanation:
No answer description is available. Let's discuss.

3.
Which of the following statments are the correct way to call the method Issue() defined in the code snippet given below?
namespace College
{
    namespace Lib
    {
        class Book
        {
            public void Issue()
            {
                // Implementation code
            }
        }
        class Journal
        {
            public void Issue()
            {
                // Implementation code
            }
        }
    }
}
  1. College.Lib.Book b = new College.Lib.Book(); 
    b.Issue();
  2. Book b = new Book(); 
    b.Issue();
  3. using College.Lib; 
    Book b = new Book(); 
    b.Issue();
  4. using College;
    Lib.Book b = new Lib.Book(); 
    b.Issue();
  5. using College.Lib.Book; 
    Book b = new Book(); 
    b.Issue();
1, 3
2, 4
3
4, 5
Answer: Option
Explanation:
No answer description is available. Let's discuss.

4.
Which of the following statements is correct about a namespace in C#.NET?
Namespaces help us to control the visibility of the elements present in it.
A namespace can contain a class but not another namespace.
If not mentioned, then the name 'root' gets assigned to the namespace.
It is necessary to use the using statement to be able to use an element of a namespace.
We need to organise the classes declared in Framework Class Library into different namespaces.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

5.
Which of the following is absolutely neccessary to use a class Point present in namespace Graph stored in library?
Use fully qualified name of the Point class.
Use using statement before using the Point class.
Add Reference of the library before using the Point class.
Use using statement before using the Point class.
Copy the library into the current project directory before using the Point class.
Answer: Option
Explanation:
No answer description is available. Let's discuss.