Assembly::GetModules Method ()
.NET Framework (current version)
Gets all the modules that are part of this assembly.
Assembly: mscorlib (in mscorlib.dll)
Implements
_Assembly::GetModules()| Exception | Condition |
|---|---|
| FileNotFoundException | The module to be loaded does not specify a file name extension. |
This method works on public and private resource files.
Note |
|---|
Modules must be emitted with file name extensions. |
The following example displays the name of the module in the returned array that contains the assembly manifest.
using namespace System; using namespace System::Reflection; int main() { Assembly^ mainAssembly = Assembly::GetExecutingAssembly(); Console::WriteLine( "The executing assembly is {0}.", mainAssembly ); array<Module^>^mods = mainAssembly->GetModules(); Console::WriteLine( "\tModules in the assembly:" ); for ( int i = 0; i < mods->Length; i++ ) Console::WriteLine( "\t{0}", mods[ i ] ); }
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show:
