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 & Explanation
Answer: Option B
Explanation:
No answer description available for this question. Let us discuss.
View Answer Workspace Report Discuss in Forum
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 & Explanation
Answer: Option A
Explanation:
No answer description available for this question. Let us discuss.
View Answer Workspace Report Discuss in Forum
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();
A. 1, 3
B. 2, 4
C. 3
D. 4, 5
Answer & Explanation
Answer: Option A
Explanation:
No answer description available for this question. Let us discuss.
View Answer Workspace Report Discuss in Forum
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.
View Answer Workspace Report Discuss in Forum
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 & Explanation
Answer: Option C
Explanation:
No answer description available for this question.