C# Namespace Aptitude Questions and Answers | Set 2

C# Namespace Aptitude Questions | Set 2: This section contains aptitude questions and answers on C# Namespace.
Submitted by Nidhi, on April 08, 2020

1) Can we create a nested namespace in C#.NET?
  1. Yes
  2. No

2) A namespace can contain an interface in C#.NET?
  1. Yes
  2. No

3) There are following statements are given below, which of them are correct about namespace in C#.NET?
  1. We cannot create a nested namespace.
  2. In C#.Net, there is no limit for nested levels for a namespace.
  3. We can create nested namespaces up to 4 levels only.
  4. To create nested namespace we need to use “using” keyword.

Options:

  1. Only A
  2. D and C
  3. Only B
  4. Only D

4) There are following statements are given below, which of them are correct about namespace in C#.NET?
  1. In C#.NET, every class belongs to a namespace.
  2. A namespace can contain either a class or a structure.
  3. All members of the namespace must be in the same file.
  4. By default name of the namespace is the project name.

Options:

  1. A and D
  2. Only B
  3. Only C
  4. B and C

5) There are following namespaces are given below, which of them are not valid namespace of .NET Framework Class Library?
  1. Data
  2. Process
  3. Web
  4. Drawing2D

Options:

  1. Only A
  2. B and D
  3. Only C
  4. A and C






Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.