IndiaBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning Non Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming C++ Programming C# Programming Java Programming
Microbiology Biochemistry Biotechnology Biochemical Engineering
Civil Engineering Mechanical Engineering Chemical Engineering Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing
Placement Papers Group Disucssion HR Interview Technical Interview Body Language
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt C Interview Questions The C Language Basics .NET Interview Questions .NET Framework ADO.NET ASP.NET Software Testing

C# Programming - Namespaces

@ : Home > C# Programming > Namespaces > General Questions

Exercise

  • General Questions
"Everything you can imagine is real."
- Pablo Picasso
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.

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

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

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.

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.



© 2008-2013 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Contact us: info@indiabix.com     Follow us on twitter!