What is a .NET "Module"
am 21.04.2008 19:12:34 von Peter Schwartz
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.
Re: What is a .NET "Module"
am 21.04.2008 19:36:54 von Andy
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.
RE: What is a .NET "Module"
am 21.04.2008 19:44:00 von brucebarker
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.
>
>
>
>
Re: What is a .NET "Module"
am 21.04.2008 19:45:48 von Peter Schwartz
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.
Re: What is a .NET "Module"
am 21.04.2008 21:41:03 von brucebarker
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.
>
>
>
>
Re: What is a .NET "Module"
am 21.04.2008 23:06:57 von Peter Schwartz
Thanks Bruce for the additional clarification.