Home »
Aptitude Questions and Answers »
C# Aptitude Questions and Answers
C# Namespace Aptitude Questions and Answers | Set 1
C# Namespace Aptitude Questions | Set 1: This section contains aptitude questions and answers on C# Namespace.
Submitted by Nidhi, on April 08, 2020
1) There are following statements are given below, which of them are correct about namespace in C#.NET?
- A namespace used to organize classes, which is useful in big projects.
- We can use only predefined namespaces.
- To create a namespace, we need to use the keyword "package".
- A namespace cannot contain delegates.
Options:
- Only A
- A and B
- B and C
- C and D
Correct answer: 1
Only A
In the above statements, only statement A is correct regarding namespaces in C#.NET.
2) There are the following options that are given below, which is not a part of the namespace in C#.NET?
- struct
- class
- enum
- database
Correct answer: 4
database
The database cannot be part of a namespace in C#.NET.
3) There are following namespaces are given below, which is not a part of .NET Framework Class Library?
- System.Threading
- System.Process
- System.Security
- System.Drawing
Correct answer: 2
System.Process
In the above options, "System.Process" is not part of .NET FCL.
4) Which keyword is used to create a namespace in C#.NET?
- package
- using
- namespaces
- namespace
Correct answer: 4
namespace
In C#.NET, to create a namespace we need to use namespace keyword.
5) Which keyword is used to include a predefined namespace in C#.NET?
- package
- using
- include
- namespace
Correct answer: 2
using
In C#.NET, using keyword is used to include a predefined namespace.