Module.FullyQualifiedName Property

Definition

Gets a string representing the fully qualified name and path to this module.

C#
public virtual string FullyQualifiedName { get; }

Property Value

The fully qualified module name.

Exceptions

The caller does not have the required permissions.

Examples

The following example displays the fully qualified name of the specified module.

C#
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];

            Console.WriteLine("myModule.FullyQualifiedName = {0}", myModule.FullyQualifiedName);
        }
    }
}

Remarks

To get the name without the path, use Name.

If the assembly for this module was loaded from a byte array then the FullyQualifiedName for the module will be: <Unknown>.

Note

The case of module name is platform-dependent.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.1
UWP 10.0