C# Programming - Namespaces
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?
2.
Which of the following is NOT a namespace in the .NET Framework Class Library?
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
}
}
}
}
College.Lib.Book b = new College.Lib.Book(); b.Issue();
Book b = new Book(); b.Issue();
using College.Lib; Book b = new Book(); b.Issue();
using College; Lib.Book b = new Lib.Book(); b.Issue();
using College.Lib.Book; Book b = new Book(); b.Issue();
4.
Which of the following statements is correct about a namespace in C#.NET?
5.
Which of the following is absolutely neccessary to use a class Point present in namespace Graph stored in library?
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers