.NET Assembly — identify the correct statements: 1) It is the smallest deployable unit. 2) Each assembly has only one entry point (Main, WinMain, or DllMain). 3) An assembly can be a Shared assembly or a Private assembly. 4) An assembly can contain only code and data. 5) An assembly is always an EXE file.

Difficulty: Easy

Correct Answer: Only 1 and 3 are correct

Explanation:


Introduction / Context:
Assemblies are the fundamental building blocks of .NET deployment and versioning. Understanding what they contain and how they are deployed is essential.



Given Data / Assumptions:

  • Five statements describe assembly characteristics.
  • We must pick the correct set.


Concept / Approach:
An assembly is the smallest deployable unit and may be private (app-local) or shared (GAC). Libraries (DLLs) have no entry point. Assemblies contain code, metadata, and optional resources; they are not always EXE files.



Step-by-Step Solution:

Check 1: True — assemblies are the smallest deployable unit.Check 2: False — class libraries (DLL) do not require an entry point.Check 3: True — assembly scope can be Private or Shared (GAC).Check 4: False — assemblies also include metadata and resources, not just code/data.Check 5: False — assemblies can be EXE or DLL.


Verification / Alternative check:
Review of assembly structure (manifest, metadata, IL code, resources) supports 1 and 3 only.



Why Other Options Are Wrong:

  • 1, 2, 3: Includes 2 (false).
  • 2, 4, 5: All three are false.
  • Only 1: Omits 3 (true).
  • Only 3: Omits 1 (true).


Common Pitfalls:
Assuming every assembly must be executable or must have an entry point.



Final Answer:
Only 1 and 3 are correct

More Questions from .NET Framework

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion