What is a .NET "Module"

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.
Peter Schwartz [ Mo, 21 April 2008 19:12 ] [ ID #1946642 ]

Re: What is a .NET "Module"

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.
Andy [ Mo, 21 April 2008 19:36 ] [ ID #1946647 ]

RE: What is a .NET "Module"

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)


"Verde" wrote:

> 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.
>
>
>
>
brucebarker [ Mo, 21 April 2008 19:44 ] [ ID #1946652 ]

Re: What is a .NET "Module"

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.
Peter Schwartz [ Mo, 21 April 2008 19:45 ] [ ID #1946653 ]

Re: What is a .NET "Module"

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)


"Verde" wrote:

> 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.
>
>
>
>
brucebarker [ Mo, 21 April 2008 21:41 ] [ ID #1946682 ]

Re: What is a .NET "Module"

Thanks Bruce for the additional clarification.
Peter Schwartz [ Mo, 21 April 2008 23:06 ] [ ID #1946698 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » What is a .NET "Module"

Vorheriges Thema: Sending html page values to ASP page
Nächstes Thema: User Control