C# Programming - Namespaces

Why C# Programming Namespaces?

In this section you can learn and practice C# Programming Questions based on "Namespaces" and improve your skills in order to face the interview, competitive examination and various entrance test (CAT, GATE, GRE, MAT, Bank Exam, Railway Exam etc.) with full confidence.

Where can I get C# Programming Namespaces questions and answers with explanation?

IndiaBIX provides you lots of fully solved C# Programming (Namespaces) questions and answers with Explanation. Solved examples with detailed answer description, explanation are given and it would be easy to understand. All students, freshers can download C# Programming Namespaces quiz questions with answers as PDF files and eBooks.

Where can I get C# Programming Namespaces Interview Questions and Answers (objective type, multiple choice)?

Here you can find objective type C# Programming Namespaces questions and answers for interview and entrance examination. Multiple choice and true or false type questions are also provided.

How to solve C# Programming Namespaces problems?

You can easily solve all kind of C# Programming questions based on Namespaces by practicing the objective type exercises given below, also get shortcut methods to solve C# Programming Namespaces problems.

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?

A. Add Reference of the namespace.
Use the elements of the namespace.
B. Add Reference of the namespace.
Import the namespace.
Use the elements of the namespace.
C. Import the namespace.
Use the elements of the namespace.
D. Copy the library in the same directory as the project that is trying to use it.
Use the elements of the namespace.
E. Install the namespace in Global Assembly Cache.
Use the elements of the namespace.

Answer: Option B

Explanation:

No answer description available for this question. Let us discuss.

2. 

Which of the following is NOT a namespace in the .NET Framework Class Library?

A. System.Process
B. System.Security
C. System.Threading
D. System.Drawing
E. System.Xml

Answer: Option A

Explanation:

No answer description available for this question. Let us 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();

A. 1, 3
B. 2, 4
C. 3
D. 4, 5

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

4. 

Which of the following statements is correct about a namespace in C#.NET?

A. Namespaces help us to control the visibility of the elements present in it.
B. A namespace can contain a class but not another namespace.
C. If not mentioned, then the name 'root' gets assigned to the namespace.
D. It is necessary to use the using statement to be able to use an element of a namespace.
E. We need to organise the classes declared in Framework Class Library into different namespaces.

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

5. 

Which of the following is absolutely neccessary to use a class Point present in namespace Graph stored in library?

A. Use fully qualified name of the Point class.
B. Use using statement before using the Point class.
C. Add Reference of the library before using the Point class.
D. Use using statement before using the Point class.
E. Copy the library into the current project directory before using the Point class.

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.