Module.FullyQualifiedName 属性

获取表示此模块的完全限定名和路径的字符串。

**命名空间:**System.Reflection
**程序集:**mscorlib(在 mscorlib.dll 中)

语法

声明
Public Overridable ReadOnly Property FullyQualifiedName As String
用法
Dim instance As Module
Dim value As String

value = instance.FullyQualifiedName
public virtual string FullyQualifiedName { get; }
public:
virtual property String^ FullyQualifiedName {
    String^ get ();
}
/** @property */
public String get_FullyQualifiedName ()
public function get FullyQualifiedName () : String

属性值

完全限定的模块名。

异常

异常类型 条件

SecurityException

调用方没有所需的权限。

备注

若要获取不带路径的名称,请使用 Name

如果此模块的程序集是从字节数组加载的,则此模块的 FullyQualifiedName 将为:<Unknown>。

提示

模块名的大小写与平台相关。

示例

下面的示例显示指定模块的完全限定名。

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
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);
        }
    }
}
using namespace System;
using namespace System::Reflection;
int main()
{
   array<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 );
}
package ReflectionModule_Examples; 
import System.*;
import System.Reflection.*;

class MyMainClass
{
    public static void main(String[] args)
    {
        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 = (Module)moduleArray.get_Item(0);
        Console.WriteLine("myModule.FullyQualifiedName = {0}", 
            myModule.get_FullyQualifiedName());
    } //main
} //MyMainClass

.NET Framework 安全性

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

.NET Compact Framework

受以下版本支持:2.0、1.0

请参见

参考

Module 类
Module 成员
System.Reflection 命名空间