.NET - .NET Assemblies

Why should I learn to solve .NET: .NET Assemblies technical interview questions?

Learn and practise solving .NET: .NET Assemblies technical interview questions and answers to enhance your skills for clearing technical interviews, HR interviews, campus interviews, and placement tests.

Where can I get technical .NET: .NET Assemblies technical interview questions and answers with explanations?

IndiaBIX provides you with lots of fully solved .NET: .NET Assemblies technical interview questions and answers with a short answer description. You can download .NET: .NET Assemblies technical interview questions and answers as PDF files or e-books.

How do I answer .NET: .NET Assemblies technical interview questions from various companies?

You can answer all kinds of .NET: .NET Assemblies technical interview questions by practising the given exercises (short answer type). You can also find the frequently asked .NET: .NET Assemblies technical interview questions with answers from various companies, such as TCS, Wipro, Infosys, CTS, IBM, etc.

What is an assembly?
Assemblies are the basic building blocks required for any application to function in the .NET realm. They are partially compiled code libraries that form the fundamental unit of deployment, versioning, activation scoping, reuse, and security. Typically, assemblies provide a collection of types and resources that work together to form a logical unit of functionality. They are the smallest deployable units of code in .NET. Compared to the executable files assemblies are far more reliable, more secure, and easy to manage. An assembly contains a lot more than the Microsoft Intermediate Language (MSIL) code that is compiled and run by the Common Language Runtime (CLR). In other words, you can say that an assembly is a set of one or more modules and classes compiled in MSIL, and metadata that describes the assembly itself, as well as the functionalities of the assembly classes.

Name the different components of an assembly.
An assembly is a logical unit that is made up of the following four different types of components:
  • Assembly manifest
  • MSIL source code
  • Type metadata
  • Resources

What are the different types of assemblies? Explain them in detail.
The following are the two types of assemblies:
  • Private Assembly - Refers to the assembly that is used by a single application. Private assemblies are kept in a local folder in which the client application has been installed.
  • Public or Shared Assembly - Refers to the assembly that is allowed to be shared by multiple applications. A shared assembly must reside in Global Assembly Cache (GAC) with a strong name assigned to it.
For example, imagine that you have created a DLL containing information about your business logic. This DLL can be used by your client application. In order to run the client application, the DLL must be included in the same folder in which the client application has been installed. This makes the assembly private to your application. Now suppose that the DLL needs to be reused in different applications. Therefore, instead of copying the DLL in every client application folder, it can be placed in the global assembly cache using the GAC tool. These assemblies are called shared assemblies.

Can one DLL file contain the compiled code of more than one .NET language?
No, a DLL file can contain the compiled code of only one programming language.