C# Interview Questions and Answers Part 10

1. What is an assembly?

Ans. Assemblies are the building blocks of the .NET framework. They are the logical grouping of the functionality in a

physical file.

2. How many classes can a single .NET DLL contain?

Ans. It can contain many classes.

3. What’s a bubbled event?

Ans. When a complex control like datalist or datagrid, which contains a child control, using an itemcommand can listen to the events raised by the child control in the main control. The process of listening to the child control in the

main or parent control is called as event bubbling.

4. What are different types of Assemblies?

Ans. Single file and multi file assembly. Assemblies can be static or dynamic. Private assemblies and shared assemblies

5. What a static assembly consist of in general?

Ans. In general, a static assembly consist of the following four elements:

  •  Assembly Manifest, which contains the assembly metadata.
  •  Type Metadata.
  •  MSIL code that implements the types.
  •  A set of resources.

From above all only the manifest is required, however the other types and resources add the additional

functionality to the assembly.

6. What is the purpose of an Assembly?

Ans. An assembly controls many aspects of an application. The assembly handles versioning, type and class scope,

security permissions, as well as other metadata including references to other assemblies and resources. The rules

described in an assembly are enforced at runtime

7. What are the advantages of an assembly?

Ans. Increased performance. Better code management and encapsulation. It also introduces the n-tier concepts and

business logic.

9. What is GAC or Global Assembly Cache?

Ans. Global Assembly Cache (GAC) is a common place to share the .NET assemblies across many applications. GAC

caches all strong named assembly references within it. All System assemblies that come with the .NET framework

reside in the GAC.

10. How to view an assembly?

Ans. We can use the tool "ildasm.exe" known as "Assembly Disassembler" to view the assembly.


Receive Quality Tutorials Straight in your Inbox by submitting your Email below:

Delivered by FeedBurner

Protected by Copyscape Duplicate Content Checker