Assembly Property

Module.Assembly Property


Gets the appropriate Assembly for this instance of Module.

Namespace:   System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

public virtual Assembly Assembly { get; }

Property Value

Type: System.Reflection.Assembly

An Assembly object.

The following example displays the full name of the specified assembly in the specified module.

using System;
using System.Reflection;

namespace ReflectionModule_Examples
    class MyMainClass
        static void Main()
            Module[] moduleArray;

            moduleArray = typeof(MyMainClass).Assembly.GetModules(false);

            // In a simple project with only one module, the module at index
            // 0 will be the module containing this class.
            Module myModule = moduleArray[0];

            Assembly myAssembly = myModule.Assembly;
            Console.WriteLine("myModule.Assembly = {0}.", myAssembly.FullName);

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
© 2015 Microsoft