What is a .NET "Module"

  • Thread starter Thread starter Verde
  • Start date Start date
V

Verde

I'm learning about .NET assemblies and in the documentation there is mention
of "module" or "modules" within an assembly. For example, the Assembly class
has a GetModules method.

What is a module as it relates to an assembly? Is a module simply a class
(or any type) within the assembly?

Thanks in advance.
 
Modules are the .NET equivalent of dll and exe executable files, and
this feature can be used to create applications that are written from
a mixture of languages.

You can mix languages in .NET to create an application, however, this
isn't done through inline code. Instead, you have to do it by linking
together seperate projects written under different languages within
the same solution.

For example, suppose you wanted to write a VB.NET applilcation that
reads Microsoft Word files. Word files are implemented through
Microsoft's Structured Storage API which is available only as a C++
library. To use this API, you would write a Visual C++.NET project
that opens MS Word files, does a directory on them, reads them, and
closes them. You would expose methods in this C++ project that your
VB.NET project can call to retrieve the data that was read from the
Word files. You would add and compile both projects into a single
solution which inturn will produce an assembly.

The VB.NET project and the C++.Net project are considered to be
modules of this finished assembly.
 
its a loadable unit in PE format, in general a .net dll. an assembly may have
a collection of modules via its manifest.

-- bruce (sqlwork.com)
 
regarding:

<< Modules are the .NET equivalent of dll and exe executable files...

I thought that an assembly is the .NET equivalent of a .dll and exe file.
Yet assemblies obviously contain or can contain many modules. So, what is
the relationship between a module and an assembly?

Thanks.
 
its common for there to be a one to one relationship between an assembly and
a module, but an assembly can have a manifest and be made up of mutiple
modules.

-- bruce (sqlwork.com)
 
Back
Top