Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Module.FullyQualifiedName Property

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

[Visual Basic]
Public Overridable ReadOnly Property FullyQualifiedName As String
[C#]
public virtual string FullyQualifiedName {get;}
[C++]
public: __property virtual String* get_FullyQualifiedName();
[JScript]
public function get FullyQualifiedName() : String;

Property Value

The fully qualified module name.

Exceptions

Exception Type Condition
SecurityException The caller does not have the required permissions.

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.

Example

[Visual Basic, C#, C++] The following example displays the fully qualified name of the specified module.

[Visual Basic] 
Imports System
Imports System.Reflection

Namespace ReflectionModule_Examples
    Class MyMainClass
        Shared Sub Main()
            Dim moduleArray() As [Module]

            moduleArray = [Assembly].GetExecutingAssembly().GetModules(False)

            ' In a simple project with only one module, the module at index
            ' 0 will be the module containing this class.
            Dim myModule As [Module] = moduleArray(0)

            Console.WriteLine("myModule.FullyQualifiedName = {0}", myModule.FullyQualifiedName)
        End Sub 'Main
    End Class 'MyMainClass
End Namespace 'ReflectionModule_Examples

[C#] 
using System;
using System.Reflection;

namespace ReflectionModule_Examples
{
    class MyMainClass
    {
        static void Main()
        {
            Module[] moduleArray;
            
            moduleArray = Assembly.GetExecutingAssembly().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);
        }
    }
}

[C++] 
#using <mscorlib.dll>

using namespace System;
using namespace System::Reflection;

int main()
{
   Module* moduleArray[];

   moduleArray = Assembly::GetExecutingAssembly()->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(S"myModule.FullyQualifiedName = {0}", myModule->FullyQualifiedName);
}

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

.NET Framework Security: 

See Also

Module Class | Module Members | System.Reflection Namespace

Show:
© 2015 Microsoft